WebClient myWebClient = new WebClient()
Stream myStream = myWebClient.OpenRead("mymodule.aspx");
-------------------------
在mymodule.aspx中 load
{
if (Session["ManagerID"] == null)
{
Page.RegisterClientScriptBlock("close", "<script>alert('对不起,您没有权限!');window.close();</script>");
}
}
------------
PS:在我原来的页面的时候Session["ManageID"]是有效的
是不是WebClient中Session无效啊,但这个网页是在我的本目录下的啊谢谢
Stream myStream = myWebClient.OpenRead("mymodule.aspx");
-------------------------
在mymodule.aspx中 load
{
if (Session["ManagerID"] == null)
{
Page.RegisterClientScriptBlock("close", "<script>alert('对不起,您没有权限!');window.close();</script>");
}
}
------------
PS:在我原来的页面的时候Session["ManageID"]是有效的
是不是WebClient中Session无效啊,但这个网页是在我的本目录下的啊谢谢
WebClient似乎不支持Session吧
System.IO.StringWriter sw = new StringWriter(sb); Server.Execute("mymodule.aspx",sw); Response.Write(sb.ToString());