'Select' control problem using code behind class to trap 'Submit' button click

Discussion in 'ASP .Net' started by TCook, Aug 13, 2006.

  1. TCook

    TCook Guest

    Hey All,

    I'm trapping a 'submit' button's 'Click' event in a VB.Net code behind class
    in order to loop through a 'Select' controls 'option' list as follows:

    For Each ThisItem In Me.MySelect.Items
    If ThisItem.Selected = True Then
    ' Do something
    End If
    Next

    I am able to read other controls, such text input, in the code behind class
    but my 'select' control is showing
    as not having any items present even though there are items shown when it is
    displayed.

    Is ASP.Net clearing the control before I can gain access to it? Is there
    some reason it is showing as being empty (i.e. 0 items)?

    Any thoughts?

    TC
    TCook, Aug 13, 2006
    #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. =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=

    Fire Code behind code AND Javascript code associated to a Button Click Event

    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=, Feb 10, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    21,206
    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=
    Feb 11, 2004
  2. walterd
    Replies:
    1
    Views:
    3,458
    Eliyahu Goldin
    Jul 20, 2004
  3. Mark
    Replies:
    1
    Views:
    1,686
  4. TCook
    Replies:
    0
    Views:
    165
    TCook
    Aug 13, 2006
  5. Gumtree
    Replies:
    3
    Views:
    247
    Matt Kruse
    Nov 10, 2004
Loading...

Share This Page