为何ASP.NET页面总是出错?
“/netStu2/testweb”应用程序中的服务器错误。
--------------------------------------------------------------------------------
未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
源错误:
行 50: private void Button1_Click(object sender, System.EventArgs e)
行 51: {
行 52: tst.func1("how");
行 53:
行 54:
源文件: c:\inetpub\wwwroot\netstu2\testweb\webform1.aspx.cs 行: 52
堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
testweb.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\netstu2\testweb\webform1.aspx.cs:52
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573