这个asp.net问题怎么解决

来源:百度知道 编辑:UC知道 时间:2024/05/09 21:09:33
“/1.01”应用程序中的服务器错误。
--------------------------------------------------------------------------------

未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。

源错误:

行 49: private void InitializeComponent()
行 50: {
行 51: this.Button1.Click += new System.EventHandler(this.Button1_Click);
行 52: this.Load += new System.EventHandler(this.Page_Load);
行 53:

源文件: e:\asp web\1.01\webform1.aspx.cs 行: 51

堆栈跟踪:

[NullReferenceException: 未将对象引用设置到对象的实例。]
_1._01.WebForm1.InitializeComponent() in e:\asp web\1.01\webform1.aspx.cs:51
_1._01.WebForm1.OnInit(EventArgs e) in e:\asp web\1.01\webform1.aspx.cs:41
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +174

-------

用的是2003吧,把这个按钮删掉,再建一个按钮!

日 你看你是不是那个类没实力化 或者你引用的Session没转换为指定类型

你也看到了。是应用程序出错。
你可以先去了这个事件。
重新注册一下。 也许就好了! 这个问题。我也遇到过。
不行,就是你的WEB服务出错。自己调一下!