Click here to Skip to main content
16,021,226 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
While run time if we click submit... login form will redirect to next page in Asp.net ..

then if we press back button in the toolbar it will go back to previous page...

How to check authentication for the page to disable previous page ....
Posted
Updated 8-Jan-10 22:43pm
v2

1 solution

I thought you said goodbye ? I don't want you to leave, but I'm surprised that you're still going, and still asking the most basic questions, and refusing to buy any books, or do any research of your own.

You can turn off caching for all your pages, with Response.Cache.SetCacheability(HttpCacheability.NoCache). Then, the best way to do it, is to store in the session if someone is logged in, and create a base page, which redirects to the login page, if the user is not logged in. Then, derive all your pages inside the secure area from this base page.

If you don't understand what I just said, it's another sign that you don't have the basic skills you need to be able to ask questions here, and do something useful with the responses. It's also another sign that it's an utter disgrace that someone is paying for the code you are writing.

==========
You can also do something like:
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();

-Sandeep
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900