Click to See Complete Forum and Search --> : How to handle going BACK on a website (ASP.NET VS2009 C#)


Shaitan00
November 28th, 2008, 02:47 AM
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,

MMH
December 4th, 2008, 04:20 AM
You need to show your code.
The place where your are filling the list and also the page load event of the page.