Dropdownlist and its ViewState
All controls on my form seem to persist their values when the page posts back except the dropdownlist. Even the even seems to not properly fire. Ofcourse I googled and found some interesting concerpts including one comment from Jason Olson's blog which suggests using the request object to restore the selected item. Here goes the code:
ddlOptions.SelectedValue = Request.Form("ddlOptions")
Real nice and clean code except for one thing, when I tried to run the code, I got the error:
"SelectedValue is not a member of DropdownList"
What!? I upload the file to my hosted server and it works fine... only to find out that this is a feature supported from framework v1.1 and beyond. I'm still using VS2002 so thats what I get. Now I have to opt for another IDE like SharpDevelop or go and shell out big $$$$. Hmph.
Last Updated:Thursday, September 02, 2010By:alfero#
with your OpenID.
If you do not know what OpenID is,