How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).
Thanks,
Tom 9 1626
Hi tshad,
Try this:
yourDropDownList.SelectecItem.Text
Guillermo G.
--------------------------------------------------------------------------------
Guillermo González Arroyave :: MCP ASP.Net C# :: DCE4
"tshad" <ts**********@ftsolutions.com> wrote in message news:Ol**************@TK2MSFTNGP14.phx.gbl...
How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).
Thanks,
Tom
d1.SelectedItem.Text;
"tshad" wrote: How do you get the selected text of a dropdown box? Selectedvalue will get you the value and selectedindex will get you the position, but how do you get the text (it isn't selectedText).
Thanks,
Tom
Is DropDownList.SelectedItem.Value what you're looking for?
-Brock
DevelopMentor http://staff.develop.com/ballen How do you get the selected text of a dropdown box? Selectedvalue will get you the value and selectedindex will get you the position, but how do you get the text (it isn't selectedText).
Thanks,
Tom
> Is DropDownList.SelectedItem.Value what you're looking for?
Oh! Indeed, DropDownList.SelectedItem.Text is what you're after. :S
-Brock
DevelopMentor http://staff.develop.com/ballen
Hi tshad,
Try this:
yourDropDownList.SelectecItem.Text
Guillermo G.
--------------------------------------------------------------------------------
Guillermo González Arroyave :: MCP ASP.Net C# :: DCE4
"tshad" <ts**********@ftsolutions.com> wrote in message news:Ol**************@TK2MSFTNGP14.phx.gbl...
How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).
Thanks,
Tom
d1.SelectedItem.Text;
"tshad" wrote: How do you get the selected text of a dropdown box? Selectedvalue will get you the value and selectedindex will get you the position, but how do you get the text (it isn't selectedText).
Thanks,
Tom
Is DropDownList.SelectedItem.Value what you're looking for?
-Brock
DevelopMentor http://staff.develop.com/ballen How do you get the selected text of a dropdown box? Selectedvalue will get you the value and selectedindex will get you the position, but how do you get the text (it isn't selectedText).
Thanks,
Tom
> Is DropDownList.SelectedItem.Value what you're looking for?
Oh! Indeed, DropDownList.SelectedItem.Text is what you're after. :S
-Brock
DevelopMentor http://staff.develop.com/ballen
"HARI PRASD BARU" <HA***********@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com... d1.SelectedItem.Text;
That was it.
I can never seem to remember that when I need it.
I never understood why you have a SelectedValue, but not a SelectedText.
Thanks,
Tom "tshad" wrote:
How do you get the selected text of a dropdown box? Selectedvalue will get you the value and selectedindex will get you the position, but how do you get the text (it isn't selectedText).
Thanks,
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dannyboyo |
last post by:
I have what I hope is a simple request. I can't really code in javascript, but I am pretty good at cusomizing it with
slight modifications. I code in ASP and HTML.
I am trying to capture customer...
|
by: Corepaul |
last post by:
As input is typed into a text box, I would like to search a recordset for the
first record that matches what has been typed so far. I would like to update
the text box to display the letters typed...
|
by: Lyn |
last post by:
Hi,
Can anyone tell me how the initial value displayed in Combo Box is
determined when a form is opened?
I am loading the dropdown from one field ("CategoryName") of a table, with
"ORDER BY ". ...
|
by: Charleees |
last post by:
Hi all,
I have a DropDown and a TextBox just bekeow it...
I have to get the selected value from dropdown and set it as textBox
Text..
The thing is i have to do this Without PostBack.....
...
|
by: suresh Chowdary |
last post by:
Hi All,
depending upon text box entry i want to show drop down box with respective values.
means if user enters 'ls' in the text box i want to show the values like 'she','he' in dropdown box it...
|
by: mj.redfox.mj |
last post by:
Can anyone help? I have a textbox which I'm programatically adding by
using the following code:
txtTest = New TextBox
txtTest.ID = "txtLeft" + cntCount.ToString...
|
by: bhanubalaji |
last post by:
hi,
I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA..
can any one help regarding this..
What's the wrong with my code?
I am...
|
by: Academia |
last post by:
I let the use modify the text of a combobox and then I replace the selected
item with the new text (in Keyup event).
But if he sets the Text property to an empty string ("") that sets the...
|
by: GArlington |
last post by:
"G. Morgan" <no_em@il.invalidwrote in message
news:8787770faf30b1bd48f393baa1a89fdbnp@mypost.invalid...
<snap>
<snap>
Did you try <cr><lf combination?
** Posted from http://www.teranews.com...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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...
| |