Solved

Want to clear usenamse and password from logon page upon successful login validation.

Posted on 2007-03-20
4
157 Views
Last Modified: 2013-12-17
Dear Experts,

What I want is to alway the username and password from my logon page which the user inadvertently saved. This means I want to disable dialog that ask to save password and always clear that logonname and password upon logon successed.

Your help would be highly appreciated.

Thanks

 
0
Comment
Question by:JaimeJegonia
4 Comments
 
LVL 15

Accepted Solution

by:
crisco96 earned 500 total points
ID: 18762937
Add the following to your Page_Load which will disable caching and force the user to re-load the page if they press the back button (clearing the username/password fields):
      Response.Cache.SetExpires(DateTime.Now.AddYears(-1));
      Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
      Response.Cache.SetNoStore();
      Response.Cache.SetNoServerCaching();
      Response.Cache.SetCacheability(HttpCacheability.NoCache);

You then need to add autocomplete="false" to your username and password field which you can do with the following code (changing the IDs of course)
      Username.Attributes.Add("autocomplete", "false");
      Password.Attributes.Add("autocomplete", "false");
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question