asp.net - Drop Down Box (select) set URL on postback? -


I have a ASP.NET Dropdown Box Control (HTML Select) page that is populated with some dynamic record value . When the user selects a record, then the entire contents of the page are updated to reflect the update. If a user clicks on a link and leaves the page and tries to go back, then it pulls the default unchecked list, and they have to search it again, what would be the best way to keep your selection ? If currently the PageName.aspx in the URL? If it is RecordID = 5 then it will select the correct setdown option. Although I'm not sure how to change the query string of a URL based on selection.

You can throw records in the viewtest

  viewstate ["record id "] = 5;  

Instead of moving the selection into the query string. You can see it on page load; If this is not empty, set the dropdown control properly.


Comments