dropdown list as child control - accessing the selection

Discussion in 'ASP .Net Web Controls' started by Cathryn Lindner, Nov 6, 2003.

  1. have a label that I am adding a dropdownlist to on the pageload event. I
    need to grab the value of the selected item from the dropdownlist. How
    do I do this?

    on the asp page:
    <asp:Label id="lblStates" style="DISPLAY: none" Runat="server"
    Width="50"></asp:Label>

    on the page_load event

    Dim ddlStates As New StateList

    ddlStates.DisplayType = StateList.EDisplayType.StateCodePlusName

    lblStates.Controls.Add(ddlStates)

    Anyone have any ideas? I can't do lblStates.txt.

    Thanks


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Cathryn Lindner, Nov 6, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    6
    Views:
    712
    Ken Dopierala Jr.
    Sep 28, 2004
  2. Jeff Rodriguez
    Replies:
    23
    Views:
    1,086
    David Schwartz
    Dec 9, 2003
  3. =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?=

    Dropdown List - Check if value exists in list prior to selection

    =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?=, Mar 10, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    1,976
    =?Utf-8?B?QnJlbmRlbg==?=
    Mar 20, 2007
  4. curiousity

    HOWTO autopost the selection list upon selection

    curiousity, Nov 21, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    259
    curiousity
    Nov 21, 2003
  5. Bostonasian
    Replies:
    1
    Views:
    886
    Bostonasian
    Feb 14, 2005
Loading...

Share This Page