asp.net登陆验证

来源:百度知道 编辑:UC知道 时间:2024/05/14 09:22:45
我使用的是ie8.0,我登陆的时候,确定密码与用户名都正确,但是还是跳到登陆页面.使用的windows验证.这是系统的兼容性的问题
要是代码问题,我还活着干嘛,浏览器设置的问题...

那是你后台代码写得不正确而已,
Session["username"]=textbox1.text;
Session["pwd"]=textbox1.text;
String sql="select * from table where username='"+Session["username"]+"' and pwd='"+session["pwd"]+"'";
if(dataopra.sele(sql)>0)
{
Response.Redirect("index.aspx");
}
else
{
RegisterStartupScript("", "<script>alter('登陆失败!')</script>");
return;
}

看一下安全性设置里面的cookie设置级别