日期:2014-05-18 浏览次数:20462 次
if (this.ddlstatus.SelectedValue == "普通用户") { if (BaseClass.CheckStudent(txtNum.Text.Trim(), txtPwd.Text.Trim())) { Session["ID"] = txtNum.Text.Trim(); Session["name"] = txtNum.Text.Trim(); Response.Cookies["UserloginName"].Value = txtNum.Text.Trim();//Cookies保存用户名
if (!IsPostBack) { try { if (Response.Cookies["UserloginName"].Value != null) { //用户曾登录 Session["ID"] = Response.Cookies["UserloginName"].Value; //读取Cookie Session["name"] = Response.Cookies["UserloginName"].Value; //读取Cookie } else { //返回登录登录界面 Response.Redirect("../Login.aspx"); }