By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,558 Members | 1,673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,558 IT Pros & Developers. It's quick & easy.

Retrieving Values from a drop down box.

P: n/a
TG
How do I get the value from the selection in a drop down box and pass
that value on to another part of the application? For example from
the drop down box to a textbox. I need this for ASP.NET/VB.NET

thanks
Terry
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
TG

Why do you not use the Dropdownlist instead of the HTML dropdown?

Cor

"TG" <tj*******@hotmail.com>
How do I get the value from the selection in a drop down box and pass
that value on to another part of the application? For example from
the drop down box to a textbox. I need this for ASP.NET/VB.NET

thanks
Terry

Nov 21 '05 #2

P: n/a
That is what I meant. How do you do it?

TG

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #3

P: n/a
TG
That is what I meant. How do you do it?

By instance in this way.

\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Me.DropDownList1.AutoPostBack = True
End If
End Sub
Private Sub DropDownList1_SelectedIndexChanged _
(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles DropDownList1.SelectedIndexChanged
TextBox1.Text = DropDownList1.SelectedItem.ToString
End Sub
///
I hope this helps

Cor

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.