Solved

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

Posted on 2007-03-20
4
149 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now