Drop Down Box (select) set URL on postback?

Posted by jamone on Stack Overflow See other posts from Stack Overflow or by jamone
Published on 2010-05-17T14:09:13Z Indexed on 2010/05/17 14:10 UTC
Read the original article Hit count: 217

Filed under:
|

I have a page with a ASP.NET DropDownBox control (HTML select) that's populated with some dynamic record values. When the user selects a record the entire contents of the page is updated to reflect the selection. If a user clicks a link and leaves the page and tries to go back, it pulls up the default unselected list, and they have to reselect it again. How would be the best way to retain their selection? I currently have the page set so if the url contains PageName.aspx?recordID=5 it will select the correct dropDown option. However I'm not sure how to change the URL's query string based on the selection.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about querystring