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

T

TCook

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top