Hii i will shaare my code
In this code when click the valaditon is showing but when click to hit database it's not working
protected void Button2_Click(object sender, EventArgs e)
{
string luname = username.Value;
string lpassword = password.Value;
cmd = new SqlCommand("select User_Email,User_Password from Dim_Users where User_Email='"+luname+"',User_Password='"+lpassword+"'");
int i = cmd.ExecuteNonQuery();
if(i != 0)
{
Response.Redirect("Home.aspx");
con.Close();
}
else
{
Response.Redirect("Error.aspx");
con.Close();
}
}

Laxmidhar SahooRank #383 · 6.6K reputationPosted Oct 4, 2018, 11:56 PM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted Oct 5, 2018, 4:17 AM EDT
Harish BatchuRank #6,801 · 256 reputationPosted Oct 5, 2018, 4:12 AM EDT
Sourav Kumar DasRank #982 · 2K reputationPosted Oct 7, 2018, 11:59 PM EDT