积极答复者
未将对象引用设置到对象的实例

问题
答案
-
你没有Session["name"].赋值引起的
if (Session["name"]!=null)
{this.Label1.Text = Session["name"].ToString();
}
努力+方法=成功- 已标记为答案 Raymond TangModerator 2010年4月22日 12:36
-
可能是Session["name"] 为 null 了
if(Session["name"] != null) {
this.Label1.Text = Session["name"].ToString();
}其实如果是 string 直接
this.Label1.Text =(string) Session["name"];
问题要简单,错误须详细@错误/异常/堆栈信息+操作系统+软件版本+all the context of the issue Hope Helpful | http://www.leoworks.net- 已标记为答案 Raymond TangModerator 2010年4月22日 12:36
全部回复
-
你没有Session["name"].赋值引起的
if (Session["name"]!=null)
{this.Label1.Text = Session["name"].ToString();
}
努力+方法=成功- 已标记为答案 Raymond TangModerator 2010年4月22日 12:36
-
可能是Session["name"] 为 null 了
if(Session["name"] != null) {
this.Label1.Text = Session["name"].ToString();
}其实如果是 string 直接
this.Label1.Text =(string) Session["name"];
问题要简单,错误须详细@错误/异常/堆栈信息+操作系统+软件版本+all the context of the issue Hope Helpful | http://www.leoworks.net- 已标记为答案 Raymond TangModerator 2010年4月22日 12:36