Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > DropDownList box problem: Object reference not set to an instance of an object.

Reply
Thread Tools

DropDownList box problem: Object reference not set to an instance of an object.

 
 
vladp
Guest
Posts: n/a
 
      08-18-2005
Hi!
Here is problem I got.
I use vb.net and MSSQL Server 2000.
My dropdownlist box gets information from view, and it works. However when I am trying to get information from the dropdownlist I get error message.
Also during step by step debug dropPP.SelectedItem.Text gets value "NOTHING"


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 442: If txtPD.Text <> "" Then .Item("dept_code") = txtPD.Text
Line 443: If txtEffort.Text <> "" Then .Item("effort") = txtEffort.Text
Line 444: If dropPP.SelectedItem.Text <> "" Then ..Item("dept_name") = dropPP.SelectedItem.Text
Line 445: 'If dropBT.SelectedItem.Text <> "" Then ..Item("budget_title") = dropBT.SelectedItem.Text
Line 446: If txtStart.Text <> "" Then .Item("efft_date_from") = txtStart.Text Else .Item("efft_date_from") = 0


Thanks.

Vlad
 
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
"Object reference not set to an instance of an object" Weird thing happens with reference a link nguyentrongkha@gmail.com ASP .Net 1 09-20-2007 09:46 PM
DropDownList control - Object reference not set to an instance of an object egi ASP .Net Web Controls 1 08-03-2004 11:32 AM
Error:Object reference not set to an instance of an object. Suresh Kojhani ASP .Net 1 07-29-2004 12:10 PM
Error !Object reference not set to an instance of an object. !!! Help Parthiv Joshi ASP .Net 2 07-02-2004 10:28 AM
Object reference not set to an instance of an object. Chris Fink ASP .Net 2 07-03-2003 06:48 PM



Advertisments