SqlConnection con = new SqlConnection("data source=Abhishek-PC;integrated security=true;initial catalog=easyschool;"); SqlCommand com = new SqlCommand("select * from LoginUser", con); con.Open(); if (con.State == ConnectionState.Open) { SqlDataReader dtr; dtr = com.ExecuteReader(); while (dtr.Read()) { Session["UserId"] = TextBox1.Text; if(dtr[0].ToString().Equals(TextBox1.Text) && dtr[1].ToString().Equals(TextBox2.Text) && dtr[2].ToString().Equals(DropDownList1.SelectedValue)) { //flag = 1; Response.Redirect("Home.aspx"); //break; } }
con.Open();
if (con.State == ConnectionState.Open)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)