Simulate the IE backward button

  • Thread starter Thread starter Mick
  • Start date Start date
M

Mick

Hi,
Is there a way to simulate the IE backward button behaviour with Asp.Net ?

thks for help.
 
here is the code I tried... and it doesn't work !!
Response.Write("<script language=javascript>");

Response.Write("history.go(-1);");

Response.Write("</script>");
 
Mick said:
here is the code I tried... and it doesn't work !!
Response.Write("<script language=javascript>");

Response.Write("history.go(-1);");

Response.Write("</script>");

Try a "history.go(-2)".
You are writing a new page (as far as the browser is concerned),
so a -1 does return you to the previous page AS SEEN FROM THIS NEW page.

NB: usually you can't mix Response.Write() and the usual asp.net output.
 
Back
Top