S
somersbar
im trying to transfer data from a listbox to a textbox. my listbox
contains a few values from an access database that im linked to. but
when i try and select a value from the listbox and transfer it to the
textbox in the 'ListBox1_SelectedIndexChanged' function i get the
following error from line 94:
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 92:
Line 93: Private Sub ListBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ListBox1.SelectedIndexChanged
Line 94: TextBox1.Text = ListBox1.SelectedItem.Text
Line 95: 'Dim areaName As String = Session("areaName")
Line 96: 'areaName = ListBox1.SelectedItem.Text
Source File: c:\inetpub\wwwroot\CinemaBookingSystem\WebForm1.aspx.vb
Line: 94
any help appreciated.
contains a few values from an access database that im linked to. but
when i try and select a value from the listbox and transfer it to the
textbox in the 'ListBox1_SelectedIndexChanged' function i get the
following error from line 94:
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 92:
Line 93: Private Sub ListBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ListBox1.SelectedIndexChanged
Line 94: TextBox1.Text = ListBox1.SelectedItem.Text
Line 95: 'Dim areaName As String = Session("areaName")
Line 96: 'areaName = ListBox1.SelectedItem.Text
Source File: c:\inetpub\wwwroot\CinemaBookingSystem\WebForm1.aspx.vb
Line: 94
any help appreciated.