Encrypting passwords using the algorithms SHA1/MD5
//name space to import for HashPasswordForStoringInConfigFile class
using System.Web.Security
Encryption using the algorithm SHA1
//stringtoEncrypt can be ,value from password text box control that is used for encryption
FormsAuthentication.HashPasswordForStoringInConfigFile(“stringtoEncrypt”, “SHA1”) ;
Encryption using the algorithm MD5
//string to encrypt can be the parameter you are using for password
FormsAuthentication.HashPasswordForStoringInConfigFile(“stringtoEncrypt”, “MD5”) ;