Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > listboxes

Reply
Thread Tools

listboxes

 
 
somersbar@yahoo.com
Guest
Posts: n/a
 
      03-07-2006
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.as px.vb
Line: 94

any help appreciated.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listboxes Big E ASP .Net 1 07-20-2004 04:59 AM
Listboxes don't always show Terry D ASP .Net 0 06-15-2004 02:41 PM
ASP.Net Listboxes Big E ASP .Net 1 06-15-2004 11:35 AM
displaying a textboxes vs. listboxes depending on postback condition jason@cyberpine.com ASP .Net 1 11-05-2003 03:52 PM
listboxes......... bill yeager ASP .Net 3 08-11-2003 06:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57