Reputation: 31
I have used HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache) in the page load event in all pages
After logging off, when the browser back button is pressed,
the textbox values of username and password still exist.
Since the values are not cleared, the user can log in to the system without entering the username and password.
How to clear the textbox values? How to solve this issue?
Thanx in advance.
Upvotes: 2
Views: 7098
Reputation: 1627
Two things:
Upvotes: 0
Reputation: 2029
Try this code, hope it works
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();
Upvotes: 1
Reputation: 5425
this may help: http://forums.asp.net/t/1308836.aspx . If not, please provide some more context (are you using ASP.NET? Are you using a proxy (e.g. Fiddler)? etc..)
Upvotes: 0