1

I am using asp.net. I have a main menu. what I have done is,I have a main menu. In the Home/About page,when user click on the menu I replacing the About page content by selected page content selected in the menu.

$("#content").html(iframeof selected menu url);

here,"content" is in About page . My problem is when I click on browser back button,It is redirecting to the login page,not redirecting to the previous selected page.

how can I display the previous page when user click on the browser back button.

neo108
  • 5,156
  • 3
  • 27
  • 41
charan
  • 292
  • 8
  • 24
  • dude, you are replacing the content of using $("#content").html(iframeof selected menu url);, So when you click back button your previous content will not be replaced, you have to write your own function, to handle the back button functionality. refer this: http://stackoverflow.com/questions/12970627/call-a-javascript-function-when-back-button-of-browser-is-clicked – RONE Aug 07 '13 at 04:49
  • Thank For the reply SAM,help me how to write the own function to get the previous url? – charan Aug 07 '13 at 05:14

1 Answers1

0

Browser only store your history, when it is full postback, means it should not be partially postback. In your case, when replacing your content, you are doing full postback or partial postback? To replace your content if you are using jquery, then it will not redirect to your previous state(page).

Harshil Raval
  • 2,115
  • 1
  • 13
  • 10