0

i have created a simple login application and i want to save username or password for login so that i don't have to insert username or password again just like we save our username or password for gmail or facebook or etc. so that we don't have to insert username or password again.

like this:- http://i49.tinypic.com/rkuats.jpg and http://i46.tinypic.com/21edys1.jpg

John Carter
  • 23
  • 1
  • 7

3 Answers3

0

You can do the following:

  • Create a Custom AutoComplete Extender. Please read the article how to do it. http://www.dotnetfunda.com/articles/article225.aspx
  • use TextChanged event to load the password
  • Use an XML to save your username and passwords
  • make sure you encrypt the passwords before save it to the xml
Manoj De Mel
  • 927
  • 9
  • 16
0

You can p/invoke the native CredUI API to securely store credentials for the current user. This API also provides a dialog to prompt the user for credentials.

Or you can use the managed ProtectedData class with the scope DataProtectionScope.CurrentUser.

Both of these techniques protect the password so that it is only accessible by the current user, without your needing to get into the complex problem of managing cryptographic keys.

Joe
  • 122,218
  • 32
  • 205
  • 338
0

If you decide to use a user or app config file. Here's a link on how to encrypt/decrypt sections of your file.

http://weblogs.asp.net/jgalloway/archive/2008/04/13/encrypting-passwords-in-a-net-app-config-file.aspx

hagensoft
  • 1,497
  • 13
  • 13