View Single Post
  #1 (permalink)  
Old October 29th, 2012, 01:53 PM
SandraDiehl SandraDiehl is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Location: Columbia, SC
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Object reference not set to an instance of an object.

I'm new to asp development and have been working through this book and all of sudden have ran into this issue, searched this forum to see if maybe I can find a solution and have not found anything let alone not only am I new to asp.net I'm new to object programming with my back ground ERP systems and mainframe languages.

I'm on Chapter 7 workflows but was going back through checking my work. Checking on the with WorkflowState.aspx page seemed to work fine until I attempt the Edit function which throws this error:

I have double checked many of times to make sure the code is correct and for the life of me can not figure it out. I am also getting the same sort of message with the WorkflowTransition.aspx on the ediit function, with the exception happening on the MethodInfo[] methods = Type.GetType(workflow.ENTWorkflowObjectName).GetMe thods(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);


Please if somebody has suggtions and can explain in very generic I'm a complete idiot terms I would be very gratiful :)

Line 205:
Line 206: //Get all the public instance properties for the object.
Line 207: PropertyInfo[] properties = Type.GetType(workflow.ENTWorkflowObjectName).GetPr operties(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);
Line 208:
Line 209: //Populate the table with all the fields.

Source File: c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\Administra tion\WorkflowState.aspx.cs Line: 207

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Administration_WorkflowState.LoadPropertiesTable(I nt32 entWorkflowId, ENTWFStateEO entWFStateEO) in c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\Administra tion\WorkflowState.aspx.cs:207
Administration_WorkflowState.LoadScreenFromObject( ENTWFStateEO baseEO) in c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\Administra tion\WorkflowState.aspx.cs:108
BaseEditPage`1.OnLoad(EventArgs e) in c:\PROJECTS\Visual Studio 2010\HNA_VacationTracking\PaidTimeOffUI\App_Code\B aseEditPage.cs:90
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772



--------------------------------------------------------------------------------