N
Nathan Baulch
I have a page with EnableViewState="false".
That page contains a DropDownList with dynamic items and a submit Button.
I need to get the SelectedIndex of the DropDownList on postback however all
I ever get is -1. This makes sense since on postback, the DropDownList is
now empty (ViewState data is responsible for maintaining the items).
Now the only way I can think of to get the SelectedIndex is to somehow get
the text that the DropDownList posted to the server and perform an IndexOf()
or FindByText().
My question is how do I manually get the text that a certain control posted
when in IsPostBack mode?
Is there a Collection somewhere of posted data?
Do controls expose raw posted data somewhere?
Cheers
Nathan
That page contains a DropDownList with dynamic items and a submit Button.
I need to get the SelectedIndex of the DropDownList on postback however all
I ever get is -1. This makes sense since on postback, the DropDownList is
now empty (ViewState data is responsible for maintaining the items).
Now the only way I can think of to get the SelectedIndex is to somehow get
the text that the DropDownList posted to the server and perform an IndexOf()
or FindByText().
My question is how do I manually get the text that a certain control posted
when in IsPostBack mode?
Is there a Collection somewhere of posted data?
Do controls expose raw posted data somewhere?
Cheers
Nathan