页面在初始化的时候需要获取seeion的值,一般seeion默认都是20分钟,过了20分钟后seeion就会消失,怎么去判断session是不是消失了。 protected void Page_Init(object sender, EventArgs e)
{
string Flag=Session["Flag"].ToString; }
{
string Flag=Session["Flag"].ToString; }
{
......
}
if (Session["Flag"] != null)
{
}
else
{
跳回登陆页
}
补充一下。。你20分钟session应该不是过期了。。而是丢失了