views:

692

answers:

2

I have a page where I submit some data, and return to the original form with a "Save Successful" message. However, the user would like the ability to return to the previous page they were at (which contains search results) by clicking the browser's Back button. However, due to the postback, when they click the Back button they do not go to the previous page,they simply go to the same page (but at its previous state). I read that enabling SmartNavigation will take care of this issue (postbacks appearing in the history) however, it has bee deprecated. What's the "new" best practice?

*Edit - I added a ScriptManager control, and wrapped the buttons in an UpdatePanel, however now I'm receiving the following error:

Type 'System.Web.UI.UpdatePanel' does not have a public property named 'Button'

Am I missing a reference?

*Disregard the above edit, I simply forgot to add the < ContentTemplate > section to the UpdatePanel :P

+3  A: 

If you put your "Save" button in an UpdatePanel, the postback will not show in the users history.

Espo
A: 

I would avoid if possible. A better solution would be to have a button that just returns them to their search results on the "Save Successful" screen.

The problem with the ajaxy saving and such is that you violate the "Back" rules that users expect. This user might want the Back button to go back to the Search page, but other users might expect that clicking Back would return them to the Add/Update page. So if another user tries to update something, clicks save, and then "woops, i forgot something on the update", they'll click back, and now they're at search results, instead of the expected Update page.

hova
This user is my customer, so her opinion is the only one I care about :-) So basically, what she wants, she gets.
YourMomzThaBomb