Hi,
I am new to VB .Net programming and is trying to create a webpage. I encountered the following error and is totally clueless on how to make it work:
=============== ===ERROR======= =============== ============
Object reference not set to an instance of an object.
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.NullRefe renceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an object.]
ICAPS_admin.Web Form1.Page_Load (Object sender, EventArgs e)
System.Web.UI.C ontrol.OnLoad(E ventArgs e)
System.Web.UI.C ontrol.LoadRecu rsive()
System.Web.UI.P age.ProcessRequ estMain()
=============== =============== =============== ============
My webpage that I am trying to load is a very simple one which consist of only 3 dropdown list and 2 textbox. Below is my VB code:
=============== ===Code =============== =============== =====
[code=vbnet]
Public Class WebForm1
Inherits System.Web.UI.P age
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()
End Sub
Protected WithEvents LabelSearchGemS ecNo As System.Web.UI.W ebControls.Labe l
Protected WithEvents txtBoxGemSecNo As System.Web.UI.W ebControls.Text Box
Protected WithEvents LabelSearchUser ID As System.Web.UI.W ebControls.Labe l
Protected WithEvents txtBoxUserID As System.Web.UI.W ebControls.Text Box
Protected WithEvents LabelStatus As System.Web.UI.W ebControls.Labe l
Protected WithEvents LabelCAtype As System.Web.UI.W ebControls.Labe l
Protected WithEvents LabelIndicator As System.Web.UI.W ebControls.Labe l
Protected WithEvents ddlStatus As System.Web.UI.W ebControls.Drop DownList
Protected WithEvents ddlCAtype As System.Web.UI.W ebControls.Drop DownList
Protected WithEvents ddlIndicator As System.Web.UI.W ebControls.Drop DownList
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub ddlCAtype_Selec tedIndexChanged (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles ddlCAtype.Selec tedIndexChanged
End Sub
End Class
[/code]
=============== =============== =============== ============
Can anyone advise on this pls?
Thanks and regards,
livmacca
I am new to VB .Net programming and is trying to create a webpage. I encountered the following error and is totally clueless on how to make it work:
=============== ===ERROR======= =============== ============
Object reference not set to an instance of an object.
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.NullRefe renceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an object.]
ICAPS_admin.Web Form1.Page_Load (Object sender, EventArgs e)
System.Web.UI.C ontrol.OnLoad(E ventArgs e)
System.Web.UI.C ontrol.LoadRecu rsive()
System.Web.UI.P age.ProcessRequ estMain()
=============== =============== =============== ============
My webpage that I am trying to load is a very simple one which consist of only 3 dropdown list and 2 textbox. Below is my VB code:
=============== ===Code =============== =============== =====
[code=vbnet]
Public Class WebForm1
Inherits System.Web.UI.P age
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()
End Sub
Protected WithEvents LabelSearchGemS ecNo As System.Web.UI.W ebControls.Labe l
Protected WithEvents txtBoxGemSecNo As System.Web.UI.W ebControls.Text Box
Protected WithEvents LabelSearchUser ID As System.Web.UI.W ebControls.Labe l
Protected WithEvents txtBoxUserID As System.Web.UI.W ebControls.Text Box
Protected WithEvents LabelStatus As System.Web.UI.W ebControls.Labe l
Protected WithEvents LabelCAtype As System.Web.UI.W ebControls.Labe l
Protected WithEvents LabelIndicator As System.Web.UI.W ebControls.Labe l
Protected WithEvents ddlStatus As System.Web.UI.W ebControls.Drop DownList
Protected WithEvents ddlCAtype As System.Web.UI.W ebControls.Drop DownList
Protected WithEvents ddlIndicator As System.Web.UI.W ebControls.Drop DownList
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub ddlCAtype_Selec tedIndexChanged (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles ddlCAtype.Selec tedIndexChanged
End Sub
End Class
[/code]
=============== =============== =============== ============
Can anyone advise on this pls?
Thanks and regards,
livmacca
Comment