W
WONG Chi Kit Keith
When the following script is processed, errors return:
Partial Class _Default
Inherits System.Web.UI.Page
Public Sub New()
Me.txtBox.Text = "This is a text box."
End Sub
End Class
Error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 5:
Line 6: Public Sub New()
Line 7: Me.txtBox.Text = "This is a text box."
Line 8: End Sub
Line 9: End Class
Source File: f:\inetpub\wwwroot\Default.aspx.vb Line: 7
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
_Default..ctor() in c:\inetpub\wwwroot\Default.aspx.vb:7
ASP.default_aspx..ctor() in c:\inetpub\wwwroot\Default.aspx.vb:912304
__ASP.FastObjectFactory_app_web_rzbiactk.Create_ASP_default_aspx() +38
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +115
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Partial Class _Default
Inherits System.Web.UI.Page
Public Sub New()
Me.txtBox.Text = "This is a text box."
End Sub
End Class
Error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 5:
Line 6: Public Sub New()
Line 7: Me.txtBox.Text = "This is a text box."
Line 8: End Sub
Line 9: End Class
Source File: f:\inetpub\wwwroot\Default.aspx.vb Line: 7
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
_Default..ctor() in c:\inetpub\wwwroot\Default.aspx.vb:7
ASP.default_aspx..ctor() in c:\inetpub\wwwroot\Default.aspx.vb:912304
__ASP.FastObjectFactory_app_web_rzbiactk.Create_ASP_default_aspx() +38
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +115
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155