日期:2014-05-01  浏览次数:22540 次

页面的CS代码
      //连接数据库验证
        if (true)
        {
            //System.Web.Security.FormsAuthentication.SetAuthCookie(this.TextBox1.Text,true);//本地的Cookies的值名为:TextBox1.Text ,能否可以永世保存在本地可以访问。
            //Response.Redirect("Default.aspx");//成功要转向的网页
           // System.Web.Security.FormsAuthentication.RedirectFromLoginPage(this.TextBox1.Text,true);//除了写入COOKIES之外,还转向上一个请求页
            System.Web.Security.FormsAuthentication.RedirectFromLoginPage(this.TextBox1.Text, CheckBox1.Checked);
        }
        else
        {
        }