SqlConnection con = new SqlConnection("server=ANKIT-PC;user id=sa;password=manager;database=db_dda;");
SqlDataAdapter da = new SqlDataAdapter("select * from adm_login where adm_id='" + TextBox2.Text + "' and adm_pwd='" + TextBox1.Text + "'", con);
con.Open();
DataSet ds=new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
Label3.Text = "Invalid";
else
Label3.Text = "Valid";
SqlDataAdapter da = new SqlDataAdapter("select * from adm_login where adm_id='" + TextBox2.Text + "' and adm_pwd='" + TextBox1.Text + "'", con);
con.Open();
DataSet ds=new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
Label3.Text = "Invalid";
else
Label3.Text = "Valid";
No comments:
Post a Comment