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

Discussion in 'ASP .Net Web Controls' started by vladp, Aug 18, 2005.

  1. vladp

    vladp Guest

    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
     
    vladp, Aug 18, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Meckelein
    Replies:
    3
    Views:
    9,304
    Kevin Spencer
    Apr 14, 2004
  2. prince -=nore=-
    Replies:
    2
    Views:
    538
    prince -=nore=-
    Jan 3, 2005
  3. Chris
    Replies:
    35
    Views:
    1,377
    Scott M.
    Mar 11, 2007
  4. Replies:
    1
    Views:
    481
    Mark Rae [MVP]
    Sep 20, 2007
  5. egi
    Replies:
    1
    Views:
    209
Loading...

Share This Page