protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["user"] == null) { Response.Write("<script language='javascript'>alert('登录信息过期,请重新登录');location.href='../../Login/Login.aspx'</script>"); } else { Dictionary <string, string> user = HttpContext.Current.Session["user"] as Dictionary <string, string>; try { storeId = int.Parse(user["storeID"]); } catch { Response.Write("<script language='javascript'>alert('您没有绑定的仓库');location.href='../../Home/Home.aspx'</script>"); }; userNum = user["num"]; category = CategoryManage.GetCate(); } }