S
somersbar
im trying to transfer data from one webform to another.
can anyone help me with the error im getting from webform1 on line 84
of my code?
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 82:
Line 83: Private Sub DropDownList2_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
DropDownList1.SelectedIndexChanged, DropDownList2.SelectedIndexChanged
Line 84: Session("cinemaName") =
DropDownList2.SelectedItem.Text
Line 85: Server.Transfer("WebForm2.aspx")
Line 86: End Sub
this is the code in webform2:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = Session("areaName")
End Sub
can anyone help me with the error im getting from webform1 on line 84
of my code?
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 82:
Line 83: Private Sub DropDownList2_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
DropDownList1.SelectedIndexChanged, DropDownList2.SelectedIndexChanged
Line 84: Session("cinemaName") =
DropDownList2.SelectedItem.Text
Line 85: Server.Transfer("WebForm2.aspx")
Line 86: End Sub
this is the code in webform2:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = Session("areaName")
End Sub