I've got a page with a dropdownlist on it. When the page is requested, there is a value passed in the url query string that represents the value of one of the list items of the drop-down list. As the page loads I'm trying to set the selected item of the drop-down list based on the value that is being passed in.
url query string is something like:
http://www.xyz.com/page.aspx?WHEREID=37attempted code:
this code throws an error saying that FindByValue() cannot be converted.
ddlSelectLevel.SelectedInd
ex = Convert.ToInt32(ddlSelectL
evel.Items
.FindByVal
ue(Request
("WHEREID"
)))
Start Free Trial