Error message, again.

  • Thread starter Thread starter Mark Goldin
  • Start date Start date
M

Mark Goldin

I have the folllowing error:

Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.

Source Error:

Line 67: UserControls.MainHRTable BasicInfo =
(UserControls.MainHRTable)Page.FindControl("MainHRTable");
Line 68: BasicInfo.AssignValue();
Line 69: // DataRow DR;
Line 70: // DR = Employee.Tables["employee"].Rows[0];

Line 68 is in RED.
MainHRTable is a user control.

What exactly that message means?
 
on line 67 you assingned a null value to the BasicInfo variable.
the line 68 fails on calling on the method AssignValue, since the BasicInfo
variable is a null reference (it has no value)

the FindControl("MainHRTable") call failed to find the control you're
looking for.
 
Back
Top