I have this DropDownList inside a DataList.
<asp:DropDownList runat="server" ID="DDL_ProdCat" OnSelectedIndexChanged="DDL_ProdCat_SelectedIndexChanged"
Autopostback="true" DataTextField="Name" DataValueField="ID" />
When the user makes a selection in this DropDownList, for some selections, they are redirected to a separate page.
After being redirected, the user hits their browser-back button, they are returned to this page with the DropDownList.
Unfortunately, the selection which redirected them to the new page is still selected.
Example
- DDL contains A,B -- Initial Selected Value: A
- User selects B -- Postback redirects them to another page
- User hits "back" on browser
- The page now shows "B" as being selected while the page-state suggests that "A" should still be selected. The page can never be in the "B" state, because "B" is marked to redirect users to that other page.
Is there a way to reset the DropDownList selection to a particular value when the user revisits the page via the browser-back button?
Note
- I am forced to use a DDL here, because the common-case is that a redirect does not occur. I understand it is generally not the best option for linking users to other pages.
- Unfortunately, I am unable to turn off browser-caching for the entire page for performance reasons