Y
yop
All
When I try to get the text from my listbox I am get an
error which is listed below.
Any ideas?
Thanks
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 83: 'Need to bind the textboxes from the
choice picked out from the list
Line 84: ' Dim ListItem As ListItem =
lstUsers.SelectedItem
Line 85: UserName.Text = stUsers.SelectedItem.Text
Line 86:
Line 87: 'Get the user details and fill textboxes
Source File: C:\Dev\Asset Register
SW\SourceCode\DotNet\ASP.NET\ASP.NET Asset
Register\AssetRegister\ViewUsers.aspx.vb Line: 85
Stack Trace:
[NullReferenceException: Object reference not set to an
instance of an object.]
AssetRegister.ViewUser.lstUsers_SelectedIndexChanged
(Object sender, EventArgs e) in C:\Dev\Asset Register
SW\SourceCode\DotNet\ASP.NET\ASP.NET Asset
Register\AssetRegister\ViewUsers.aspx.vb:85
System.Web.UI.WebControls.ListControl.OnSelectedIndexChang
ed(EventArgs e)
System.Web.UI.WebControls.ListBox.System.Web.UI.IPostBackD
ataHandler.RaisePostDataChangedEvent()
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain()
When I try to get the text from my listbox I am get an
error which is listed below.
Any ideas?
Thanks
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 83: 'Need to bind the textboxes from the
choice picked out from the list
Line 84: ' Dim ListItem As ListItem =
lstUsers.SelectedItem
Line 85: UserName.Text = stUsers.SelectedItem.Text
Line 86:
Line 87: 'Get the user details and fill textboxes
Source File: C:\Dev\Asset Register
SW\SourceCode\DotNet\ASP.NET\ASP.NET Asset
Register\AssetRegister\ViewUsers.aspx.vb Line: 85
Stack Trace:
[NullReferenceException: Object reference not set to an
instance of an object.]
AssetRegister.ViewUser.lstUsers_SelectedIndexChanged
(Object sender, EventArgs e) in C:\Dev\Asset Register
SW\SourceCode\DotNet\ASP.NET\ASP.NET Asset
Register\AssetRegister\ViewUsers.aspx.vb:85
System.Web.UI.WebControls.ListControl.OnSelectedIndexChang
ed(EventArgs e)
System.Web.UI.WebControls.ListBox.System.Web.UI.IPostBackD
ataHandler.RaisePostDataChangedEvent()
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain()