Error - System.NullReferenceException....

Results 1 to 2 of 2

Thread: Error - System.NullReferenceException....

  1. #1
    Join Date
    Dec 1969

    Default Error - System.NullReferenceException....

    Hello All,<BR><BR>I am getting the following error when adding a row to a datatable I created on the Page_Load... does anyone know why this is?<BR><BR>Error: System.NullReferenceException: Object reference not set to an instance of an object.<BR><BR>I am creating the datatable on the Page_Load, and then have a Web Form that the user enters information into it and when posted it is added to the datatable with a Button_Click subroutine... Also I only have the table being created "If Not IsPostBack Then" so that the table is not created again each time the page loads... does the table not persist or am I missing something else? Thanks guys and gals...

  2. #2
    Join Date
    Dec 1969

    Default RE: Error - System.NullReferenceException....

    Your object cannot be null when loading from a db. You have to do a check on it using isdbnull...<BR><BR>try something like<BR><BR>if isdbnull(dbvalue) then<BR>&#039;do something<BR>end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts