rebelknight
Technical User
I have a drop down list control inside a user control that is used as search criteria for an ASP.Net page.
The user control sits on my web page and allows a user to select a value from its list of values. When a user selects a value and clicks on a submit button I want to be able display the page with the search results and retain the selected value in the drop down list.
To do this I have placed a Response.Redirect command behind the button to show the same web page again. I want to include a querystring parameter from the selected drop down list value but I can’t figure out how to access the value.
Clearly I need the SelectedValue property of the drop down list but how do I get at it?
I expected I would have to take it from the projectname.searchcontrol.dropdownlist.selectedvalue but that isn’t accepted as valid code.
The user control sits on my web page and allows a user to select a value from its list of values. When a user selects a value and clicks on a submit button I want to be able display the page with the search results and retain the selected value in the drop down list.
To do this I have placed a Response.Redirect command behind the button to show the same web page again. I want to include a querystring parameter from the selected drop down list value but I can’t figure out how to access the value.
Clearly I need the SelectedValue property of the drop down list but how do I get at it?
I expected I would have to take it from the projectname.searchcontrol.dropdownlist.selectedvalue but that isn’t accepted as valid code.