Model.userPower mUserPower = new Dianda.Model.userPower();//用户的权限实体类 protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { Session["index_pages"] = null; string urls = Request.FilePath.ToString();// //获取到当前的页面的URL if (urls.Contains("department_Index.aspx")) { Session["index_pages"] = "1"; } else { Session["index_pages"] = null; } //string ID = "1"; //MakeSession(ID); Label_time.Text = commons.getDays("4"); //wult 2011-2-15 to alter //当Label_navigation 显示的不是“部门主页”的时候,Master_DDList_BM 都不显示 if (Label_navigation.Text.ToString().Trim() != "部门主页") { Master_DDList_BMXZ.Visible = false; } else { Show_Master_DDList_BMXZ(); } if (Session["USER_Users"] != null) { userModel = (Model.USER_Users)Session["USER_Users"];//实例化 Label_userReal.Text = userModel.REALNAME.ToString() + "(" + userModel.USERNAME.ToString() + ")"; sessionJudge(); } else { string coutws = "<script language=\"javascript\" type=\"text/javascript\">alert(\"您目前已经登录超时!请重新登录!谢谢!\");location.href='/login.aspx';</script>"; Response.Write(coutws); } } string urls2 = Request.FilePath.ToString(); if (urls2.Contains("/Admin/person_Index.aspx") || urls2.Contains("/Admin/department_Index.aspx")) { bannerid.Attributes.Add("class", "master_label_small"); bannerid2.Width = "220px"; } else { bannerid.Attributes.Add("class", "master_label"); bannerid2.Width = "1px"; } } catch { // string coutws = "<script language=\"javascript\" type=\"text/javascript\">alert(\"您目前已经登录超时!请重新登录!谢谢!\");location.href='/login.aspx';</script>"; // Response.Write(coutws); } }