-3

I have a ASP.Net page which includes a search input

  1. search input takes a value
  2. button fills a table with data
  3. each data has a link button to go to another page
  4. when I press this link I can go to the another page
  5. when I press back button of the browser it return me again to the search page and the search input still saved the value

I need to create a button when I click it behave as browser back button.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
sara adly
  • 297
  • 1
  • 5
  • 19
  • onclientclick="javascript:window.history.back()" – Gusman Feb 26 '16 at 15:06
  • 1
    Already voted to close for another reason, but this is also a duplicate: http://stackoverflow.com/questions/13490407/how-to-emulate-browser-back-button-using-javascript – David Feb 26 '16 at 15:07

2 Answers2

1

You can use history.go(-1) or history.back()

Here is a link you may find helpful: How to emulate browser back button using javascript

Community
  • 1
  • 1
devigner
  • 152
  • 12
0
<input type="button" value="Back" onclick="window.history.back();" />

This input tag will go back in the Browser history by one page unless there isn't anything in the history to go back to.

Nathangrad
  • 1,426
  • 10
  • 25