How can we make the backward button disable in the all browsers? [duplicate]
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 aft开发者_开发百科er 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 .
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.
精彩评论