473,473 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Retrieving Values from a drop down box.

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
3 990
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bryan Donaldson | last post by:
I have a table on my web form, declared like this: <asp:table id="tblOverrides" runat="server" enableviewstate=true" cssclass="clsTable"> <asp:tablerow cssclass="clsTblHeader"> <asp:tablecell ...
2
by: macyp | last post by:
I have to pass values from one aspx page to another. The controls I have in the first page are: a textbox, 3 drop down lists, and 2 check boxes, and a submit button. It is a search page, and the...
6
by: John | last post by:
I have a drop down on my form and I need all the values in that drop down and pass to a stored procedure, how can I get the values of the drop down and pass them all to my stored procedure call?
2
by: jupitermoonbeam | last post by:
Hi, I wondered if anyone can help. I have scowered the web and found absolutely nothing that relates to my particular problem and I am pulling my hair out. Basically, I have a scenario where...
2
by: Jim Gregg | last post by:
Hello all, I am faced with some logic that I am unsure how to handle. Imagine that I am running a WMI query and I am outputting the data into a dynamically created ASP table control. Here is my...
2
by: Parz | last post by:
Hi am facing problem in retrieving the value selected from drop down menu in one page from the next page..Am using the following code to populate the drop down menu with values form the database. ...
2
by: mrjoka | last post by:
hi all, i have a web site that has a tree view, and in this view i have a lot of web sites, so in the defaul page you can choose a value from a drop down list, i did transfer this value in a session...
1
by: bytenut | last post by:
I would like to display two field values in a combo after selecting from the list items... i.e. my drop-down shows two fields from a lookup, but when I select the item, only the first field value is...
3
by: phpmagesh | last post by:
Hi, I have a drop down in my page, what i will do with that drop down is i have a table in my database, which have values and this table will refer that ID and pick the name of that values and...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.