in my web page i do have option for registration, now i want to send the password to given mail address for completion of registration and req for password change for first time login
can u tell me the login verification case sensitive password
protected void Login2_Authenticate1(object sender, AuthenticateEventArgs e)
{
try
{
string uname = Login2.UserName.Trim(); //Get the username from the control
string password = Login2.Password.Trim(); //get the Password from the control
bool flag = AuthenticateAdminUser(uname, password);
if (flag == true)
{
e.Authenticated = true;
Session.Add("adminusername", Login2.UserName);
Login2.DestinationPageUrl = "Admin.aspx";
}
else
e.Authenticated = false;
}
catch (Exception)
{
e.Authenticated = false;
}
}
private bool AuthenticateAdminUser(string uname, string password)
{
bool bflag = false;
string strSQL = "select * from admin_login where cAdmin_Id ='" + uname + "' AND cAdmin_pass ='" + password + "'";
DataSet userDS = new DataSet();
SqlConnection m_conn;
SqlDataAdapter m_dataAdapter;
try
{
m_conn = new SqlConnection(conn);
SqlCommand m_Command = new SqlCommand(strSQL, m_conn);
m_conn.Open();
m_dataAdapter = new SqlDataAdapter(strSQL, m_conn);
m_dataAdapter.Fill(userDS);
m_conn.Close();
}
catch (Exception ex)
{
userDS = null;
}
if (userDS != null)
{
if (userDS.Tables[0].Rows.Count > 0)
bflag = true;
}
return bflag;
}
this code is working but not case sensitive