Shaitan00 Posted November 28, 2008 Posted November 28, 2008 I have a problem with my web site when dealing with the BACK button... Imagine the following, I have a DropDownList that allows the user to select an option which, when selected (_SelectedIndexChanged event) sends me to another web page... The problem comes if the user presses BACK afterwards he is returned to the previous page with the DropDownList that still has the option selected. Therefore, if the user wants to proceed to that option again he has to change to the empty listing in the DropDownList and then select the option to fire off the _SelectedIndexchanged event. What I want is that, if the user presses BACK it resets the DropDownList.selectedindex=0 (empty) which forces the user to reselect an option - however no matter what I try when the user presses BACK it always returns to how it was even when I reset the selected index of the DropDownList before leaving the selection page. Is there some special way to handle the BACK button when creating a website? I want to be able to reset the SelectedIndex of my DropDownList in the case where the user presses BACK ... Any help would be much appreciated - I can't seem to figure out how to get around this rather annoying bug in my site. Thanks, Quote
Diesel Posted December 2, 2008 Posted December 2, 2008 Disable the control state for the dropdownlist. Set the default to selectedindex of -1. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.