When the user select an item from a dropdownlist and presses a button, my application shows a list of data manually binded and filtered according the selected value. If the user presses the Refresh button of the browser, it asks for confirmation whether the user is sure they want to submmit the query again.
I don’t want the browser asks this. How can I avoid this behaviour?
As far as I understand, this can be done implementing the post/redirect/get pattern, but I don’t know how to do it in ASP.NET 3.5.
Yep, something like this will do the job for you, in your page load event for example:
The other problem with this pattern is that you’ll end up with this additional redirect in the history which might cause the users to have to click back twice to get back to your search form.
On the plus side, they can now bookmark the results page quite happily and return to their results without having to re-submit the form.