SqlConnection con = new SqlConnection(@"Data Source=AP\sqlexpress;Initial Catalog=SBAIMS;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("select * from User_Master where UserID='"+userid.Value+"' and Password='"+password.Value+"'",con);
SqlDataAdapter adptr = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
adptr.Fill(ds, "User_Master");
if (ds.Tables["User_Master"].Rows.Count > 0)
{
Session["slogin"] = userid.Value;
Response.Redirect("WebForm2.aspx");
}
else
{
}
con.Close();
我想知道在else部分写什么来将控件重定向到href = retrylogin,我在Default.aspx页面中创建了一个带有'retrylogin'作为id的模态。以上是Default.aspx的cs文件
非常感谢你!