0

Possible Duplicate:
Disable browser's back button

Hi everyone,I have a portal site and i want to make the backward button to disable state after the user gets logout.Is it possible by C# programming?Or we need to go for client side scripts like Javascript or jquery?Please help me regarding this .

Community
  • 1
  • 1
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95

1 Answers1

1

You can't do anything on the client with server-side code (C#) except send content to the browser.

There are Javascript things you can do to manipulate the history to a degree, but my guess is you have an architecture problem here; There's no reason you should prevent clicking 'back' simply because they have logged out. Your application should detect that they are logged out, and present them with appropriate content.

Finally, to answer your question: You can't just disable the back button. Period.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123