用这么多的session是不是不好啊
protected void btnLogin_Click(object sender, ImageClickEventArgs e)
{
string name = txtLoginName.Text.Trim();
string pwd = txtLoginPwd.Text.Trim();
int statusId = int.Parse(ddlStatusType.SelectedValue);
HuaiXinTRAS.Model.TeacherInfo model = bll.Login(name, pwd, statusId);
if (model != null)
{
Session["loginname"] = model.LoginName;
Session["statusid"] = model.statusId;
Session["teacherName"] = model.teacherName;
Session["teacherId"] = model.teacherId;
Session["deptid"] = model.deptId;
Response.Redirect("main.aspx");
}
else
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>alert('用户名或密码不正确!');</script>");
}
}
用这么多的session是不是不好啊