473,382 Members | 1,225 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

how to get selected value from dropdown list

Hi,

I created a web user control, a dropdown list of countries which binds to a
select statement. I have placed that control in 2 different locations within
the same form, but in different panels. When the page loads the control
binds and displays perfectly. How do I get the selected value of each drop
down?

Thanks,

Andy
Nov 19 '05 #1
4 1911
Is DropDownList.SelectedValue what you're looking for?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I created a web user control, a dropdown list of countries which binds
to a select statement. I have placed that control in 2 different
locations within the same form, but in different panels. When the page
loads the control binds and displays perfectly. How do I get the
selected value of each drop down?

Thanks,

Andy


Nov 19 '05 #2
lstDropDown.SelectedItem.Text or
lstDropDown.SelectedItem.Value
"Andy Sutorius" <an**@sutorius.com> wrote in message
news:Zp********************@twister.southeast.rr.c om...
Hi,

I created a web user control, a dropdown list of countries which binds to
a
select statement. I have placed that control in 2 different locations
within
the same form, but in different panels. When the page loads the control
binds and displays perfectly. How do I get the selected value of each drop
down?

Thanks,

Andy

Nov 19 '05 #3
It's a web user control and there are 2 of them. It's not that simple is it?
"Scott M." <No****@NoSpam.com> wrote in message
news:uh**************@TK2MSFTNGP14.phx.gbl...
lstDropDown.SelectedItem.Text or
lstDropDown.SelectedItem.Value

Nov 19 '05 #4
Why should it be any harder than this?
"Andy Sutorius" <an**@sutorius.com> wrote in message
news:UV********************@twister.southeast.rr.c om...
It's a web user control and there are 2 of them. It's not that simple is
it?
"Scott M." <No****@NoSpam.com> wrote in message
news:uh**************@TK2MSFTNGP14.phx.gbl...
lstDropDown.SelectedItem.Text or
lstDropDown.SelectedItem.Value


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: DC Gringo | last post by:
I have a dropdownlist that, upon form submission, I'd like to maintain the selected value when I get my result...how do I do that? <asp:dropdownlist Font-Size="8" id="ddlCommunities"...
5
by: Kris Rockwell | last post by:
Hello (again), I have gotten the dropdown list functionality to work through a few tricks (probably not the most efficient, but it works) but I am not sure how to set the default selected value....
3
by: Celine | last post by:
I have a webform with multiple panels with textboxes, dropdownlists, radiobuttonlists, etc. The user navigates through the panels and then submits the information at the end. The first panel...
6
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I...
6
by: | last post by:
Do you have to use AutoPostBack to read the selected value in a dropdown list? I have an asp.net dropdown on a form. I'm filling it from a table when the page loads and want to read the value the...
1
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in...
1
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. ...
6
by: yasodhai | last post by:
Hi, I used a dropdown control which is binded to a datagrid control. I passed the values to the dropdownlist from the database using a function as follows in the aspx itself. <asp:DropDownList...
6
by: itgaurav198 | last post by:
Hi, i have one jsp in which i select a value from drop down and on change of this a servlet is called that accesses some values and return to the same jsp where these values get populated in...
16
by: tarunkhatri | last post by:
Hi. I have a javascript function to change the value of the cell on chnage event of a dropdown list.My code is workin but the problem is that the value of the cell is chaning but not respective to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.