c#未将对象引用设置到对象的实例
大家帮我看一下我的这段代码怎么改?
a页面(登陆):Session["userid"] = userid;
b页面:
protected void LinkButton消息_Click(object sender, EventArgs e)
{
if (Session["userid"] != null && Session["userid"] == "1")
{ Response.Write(" <script>window.location.href='result1.aspx';</script> "); }
else
{ Response.Write(" <script>window.location.href='result2.aspx';</script> "); }
}
uiserid值不是空的啊。。