using System.Web.Security;
using System.Drawing;
Write this code Under the click event of Check Button:
string password, check;
password = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "MD5");
check = FormsAuthentication.HashPasswordForStoringInConfigFile(txtEnterPassword.Text, "MD5");
if (password == check)
{
lblPassword.Text = "Password Match";
lblPassword.ForeColor = Color.Green;
}
else
{
lblPassword.Text = "Password Incorrect";
lblPassword.ForeColor = Color.Red;
}