When i click this button connection should establish ...
my coding is
my coding is
Code:
protected void Button1_Click(object sender, EventArgs e) { cn.Open(); cmd.Connection = cn; cmd.CommandText = "select user,pass from register where user_id='" & TextBox1.Text & "' and password='" & TextBox2.Text & "'"; s = cmd.ExecuteReader(); If s.Read(); Then Response.redirect("Login.aspx"); Else Response.Write("invalid username or password"); End If cn.Close(); }
Comment