SmartNavigation and last page state

  • Thread starter Thread starter Heinrich Moser
  • Start date Start date
H

Heinrich Moser

SmartNavigation is supposed to keep the page's last state
in the browser history. As far as I can tell, it doesn't
do that if you use Response.Redirect to change to another
page.

Steps to reproduce the behavior:

1. Create a new webform with one WebControls.TextBox and
two WebControls.Button-Controls "Do nothing" and "Jump".

2. Add the code

Response.Redirect("http://www.microsoft.com")

(or any other URL) to the Jump-Button's Click event.

3. Start the application. Enter "1" into the textbox and
click "Do Nothing". Enter "2" and click "Do Nothing".
Enter "3" and click "Jump". IE should now navigate to the
Microsoft homepage.

4. Notice that when you click on the Back button, the
textbox contains "2" and not "3", as you would expect.

This is a problem, because in our application the buttons
(which are labeled differently, of course) save the user
input into the database. When the user navigates back in
order to click on another jump button, the data is being
overwritten with old values.

Any suggestions will be appreciated.

Sincerely,
Heinrich
 
Hi

Response.Redirect("<<blah blan>>"), Redirects a client to
a new URL and specifies the new URL.

Smart navigation is best used with ASP.NET pages that
require frequent postbacks but with visual content that
does not change dramatically on return.

Ravikanth
 
Back
Top