using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class EditMenu_menu : System.Web.UI.Page { // UserData myud = new UserData(); LYS.UserData1 myud = new LYS.UserData1(); string username = ""; string usertype = ""; string userdemp = ""; protected void Page_Load(object sender, EventArgs e) { //类别:院管理员、系管理员、督导员、教师 if (Session["UserName"] != null) { username = Session["UserName"].ToString(); usertype = Session["UserType"].ToString(); userdemp = Session["UserDemp"].ToString(); } else if (myud.ReadCookies("UserName").Trim().Length > 0) { username = myud.ReadCookies("UserName").Trim(); usertype = myud.ReadCookies("UserType").Trim(); userdemp = myud.ReadCookies("UserDemp").Trim(); } else { Response.Redirect("LoginNew.aspx"); } Literal2.Text = "欢迎您:" + username; Literal3.Text = usertype + "." + userdemp ; Literal1.Text = myud.Prod_menu(usertype).ToString(); } }