ASP.net用户代码未处理NullReferenceException未将对象引用设置到对象的实例
[local]1[/local]using System.Data;using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class left : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
Label1.Text = Session["userName"].ToString() + "您好!";
}
}
}
红色部分是出错的
[ 本帖最后由 陈奇怪 于 2015-6-28 18:02 编辑 ]