TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jpknarr
NA
8
0
how to pass a value from a drop down list to a string variable
Apr 15 2004 9:56 AM
can anyone help me with this please!!! i'm using sql server 2000 for my DB and i've populated a drop down list with a column of the DB. I can't for the life of me pass the selected item into a string variable to do a new query. please help!! code: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim ConnectionString As String = "server=*****;user=jpkasdnfaarr;password=dmbasadfasnasddf41;database=faasdfasdfb23" Dim cnn As New SqlConnection(ConnectionString) Dim da As New SqlDataAdapter("select distinct popout_num from popouts", cnn) Dim ds As New DataSet Dim PopoutsTable As New DataTable PopoutsTable.TableName = "Popouts" da.Fill(ds) 'Fill the Drop Down List with Popout Numbers DropDownList1.DataSource = ds DropDownList1.DataTextField = "popout_num" DropDownList1.DataBind() 'DropDownList1.AutoPostBack = True 'This always puts the initial popout number value in the drop down list. We don't want this to happen. I don't know what else to say. Please Help!! Thank you in advance. DJ
Reply
Answers (
1
)
Setup and Deployment
global variable in c#