How to get a value from <select> group inASP.NET Page?

Hi all!

I don't have a clue how I can get a value from some <select> group on my page?
From where I can find all the components on my page and on my form?
Thankyou in advance!!
Arto Kainu


Joensuu, Finland
1/23/2004 10:41:40 AM 91979 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 54

Do you mean an HTML select which can be either a listbox or a dropdown.

You can use the server control called dropdownlist, you can access its selected value using MyDropDownList.SelectedItem to get the selected text or MyDropDownList.SelectedValue to get the selected value.
1/23/2004 11:43:48 AM

Similar Artilces:

get value from <select> value & display value
hi all, i want these two bold values which are below,  underline value i can get but second bold value i m not avail to get please help.... <select><option value="ma">manoj</option> </select> regard khushak  P.S. if possible then Please with  java script other wise code behind New In .NET World See my post in this thread.  That should take care of you. Peter BrunoneMS MVP, ASP.NETFounder, EasyListBox.comDo the impossible, and go home early....

Lists in .net
Like a good AKA accessible app building developer, my application's navbar is controlled with CSS and using <ul> and <li> I just have the code in the HTML display and it works fine when everything should be visible, however, I need to restrict some users from viewing certain navbar links based on their security levels.  How do I hide the list items that need to be hidden? TIA hello! give them ids and runat="server" attribute. then in code behind set the Visible property to false. orzeh code less, think more! Okay, I tried putting the link as a link bu...

How to get the selected text HREF value using
Hello friends,                     If i have a page opened in a web browser control for example .if i select a particular content in google web page i have to get the href value of the selected to do this anyone help me. with regards, Balaji.   Balaji,Chennai...

problem with get value from textbox after get it value in load page
hi every one  i have problem with my web site when i get textbox value in load page   and Changed textbox the page do not take last value .   it take value in load page   this is code:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)   TextBox1.Text = "aa" End SubProtected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) MsgBox(TextBox1.Text) End Sub   when i press button message write "aa" while i changed the textbox   please if enyone knowen help me &nbs...

Get Selected Value for SqlDataSource Select Parameter located in Content Page from ListBox located in Master Page
i wanna Get Selected Value for SqlDataSource's Select Parameter located in Content Page from ListBox located in Master Page ? So how can i do that ?   Thanks in Advance..I am not a perfect programmer, but i have perfect programmers' habits [ i think so :)] Write a public property in the MasterPage that returns the ListBox text/value, so that you can call it in your contentpages. public partial class MasterPage1 : System.Web.UI.MasterPage{    public string ListBoxValue {        get { return ListBox1.SelectedItem.Value; } ...

Populating a listBox (i.e. <select><option>) from DB using VB.NET
_/_/_/_/_/_/_/_/_/_/_/ _/_/_/_/_/_/_/_/_/_/ _/_/_______/_/_/_/ Hi every one! I am trying to populate a listbox using VB.NET. I am using SQL Server 2000, and the database looks like this: (sport prefixes) Table name: Prefixes ID Prefix ----- ----------- 1 FTBL 2 SCCR 3 TNNS 4 HCKY .... ... There's a list (i.e. <select><option>) on the web form and its id=Prefixes_list. The list is in a .ascx file, and the code for populating...

Is there a simple way to get a property value of <smtp></smtp> in web.config?
I know I can use the ConfigurationManager.AppSettings["VersionOfWebSite"] code to get value of the key VersionOfWebSiteNow I hope to get the value of from property in <smtp> (the value is, how can I do? Thanks! //--------------------------Web.Config--------------------------------------<?xml version="1.0"?> <configuration xmlns="">   <>    <mailSettings>      <smtp from="">      &nb...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Getting Start With .net
hi i'm intersted to learn (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

Microsoft CEO: Hackers Getting Smarter <<<Geee>>>
Microsoft Corp.'s chief executive believes it's naive to suggest the software giant can eliminate all security vulnerabilities in its various products even though engineers are trying hard to do so. Hackers get smarter, too, Steve Ballmer told several thousand information-technology workers at the Gartner Symposium ITXPO. But Ballmer said engineers were making progress, such as adding security enhancements to Windows Server 2003 when its next big update, Service Pack 1, comes out. -- Regard: Joh@nnes � :-)) 1216771 Ont.I...

HELP...stil could not get NNTP<<<TIA>>>
This post is from web-interface,but try to get with " or "" still unable to connect to server<<No,socket error>> I let ZA medium security does not make any different.For any help TIA!!!BTW,IE-5.5sp1 with OE-5.5 Regard: Joh@nnes 1216771 Ont.Inc. Joh@nnes, If you right click on the grc server and check properties, on the server tab I have This Unix server is picky about the email address you give on the general tab. It *must* follow the format of xxx@yyy.zzz. Don't leave out the period. Bob Vanderveen "Jo...

nsWebBrowserPersist gives me <window>, not <html>
Is there supposed to be a way to use the saveDocument method in nsIWebBrowserPersist, from JavaScipt, that can give one the page source? I have also seen this question prefaced with "I am a <insert word that rhymes with ruby>, but...", which is probably a good way to not get an answer. Well, I am not new. Do I understand everything I see in FF, or know where _all_ the documentation is? No. Do I have those dragon-shaped scars on my forehead that people outside Mountain View get as they bang their head against this stuff? Yes. I do. I am using the nsIWebBrowse...

How to get the HREF value of the Anchor tag in a web page using the web browser control in
Hi Friends,               i have a webserver control in my application.i load the web browser control on a button click using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click                AxWebBrowser1.Navigate("", False) End sub once the page is loaded in the browser i want the <a> HREF value in that page.For example if that page has ...

i can't get the value with <%=value%>
onclick="PopUp('SayfaKod-Yardim.aspx?<%=URL01%>')" a hyperlink has that property but i cant get the value by using this. it redirects the webpages to SayfaKod-Yardim.aspx?<%=...... so it give bad request error. Where is the problem ? it is not IN A DATAGRID OR A GRIDVIEW. it is placed normally =)    but i CAN  get  a value by using same method on a datagrid but using with #databinder.eval   well =) i can get with a normal html link but how to get the same value with the hyperlink ? damn there is no edit button on that forum =) <asp:Hy...

Web resources about - How to get a value from <select> group inASP.NET Page? -

Resources last updated: 1/22/2016 6:32:33 PM