drop down menu - SelectedIndex of DropDown list not setting correctly in C# -
in aspx form, returning page several dropdown boxes, , want set values selected before leaving page.
i returning selectedindex
values through url parameters pickup in code:
string oldvalue = request.querystring["oldvalue"].tostring();
oldvalue accurately takes on correct value. however, when try set dropdown selectedindex value, continually selectedindex set "-1"
example (temporarily bypassing querystring
, using value directly):
ddlsearchcollege.selectedindex = 3;
i have breakpoint here, , when hover mouse on selectedindex
, value shows "-1" instead of 3.
Comments
Post a Comment