Solved

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
This video teaches users how to migrate an existing Wordpress website to a new domain.

777 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