title: Graph from Code Behind Value cannot be null. Parameter name: key ERROR
body: <p>I am trying to use Syncfusion graph via codebehind. I found this link and sample program as below link.</p>
  
  <p><a href="https://www.syncfusion.com/forums/130261/create-charts-dynamically-base-on-user-data" rel="nofollow noreferrer">https://www.syncfusion.com/forums/130261/create-charts-dynamically-base-on-user-data</a></p>
  
  <p><a href="http://www.syncfusion.com/downloads/support/forum/130261/ze/Sample-503161674" rel="nofollow noreferrer">http://www.syncfusion.com/downloads/support/forum/130261/ze/Sample-503161674</a></p>
  
  <p>I was able to run the sample project without issue, the graph shown as expected. However when I tried to copied the same code to my project and run it, I keep getting an error as below. Anybody can shed a light where did I do wrongly?</p>
  
  <blockquote>
    <p>Server Error in '/' Application. Value cannot be null. Parameter name:
    key 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.</p>
    
    <p>Exception Details: System.ArgumentNullException: Value cannot be null.
    Parameter name: key</p>
    
    <p>Source Error:</p>
    
    <p>An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of
    the exception can be identified using the exception stack trace below.</p>
    
    <p>Stack Trace:</p>
    
    <p>[ArgumentNullException: Value cannot be null. Parameter name: key]<br>
    System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +12756140 
    Syncfusion.JavaScript.EssentialJavaScript.RegisterControl(String id,
    String jsonData) +26    Syncfusion.JavaScript.Control.RenderJson()
    +224    Syncfusion.JavaScript.Control.Raw() +98    Syncfusion.JavaScript.Control.ToHtmlString() +8<br>
    Syncfusion.JavaScript.Web.Chart.Render(HtmlTextWriter writer) +51<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +129<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +287<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +197<br>
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9<br>
    System.Web.UI.Control.Render(HtmlTextWriter writer) +10<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +129<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +287<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +197<br>
    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
    writer) +177<br>
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter
    writer) +32<br>
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +357
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +129<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +287<br>
    System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter
    writer) +53<br>
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children) +197<br>
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9<br>
    System.Web.UI.Page.Render(HtmlTextWriter writer) +30<br>
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    ControlAdapter adapter) +129<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    ControlAdapter adapter) +287<br>
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27<br>
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +5626</p>
    
    <p>Version Information: Microsoft .NET Framework Version:4.0.30319;
    ASP.NET Version:4.8.4075.0</p>
  </blockquote>
  
  <p>As a matter of fact, I tried to use ajaxcontroltoolkit graph, also get the same error. There must be some setting or configuration error from my project. But I couldn't catch it. Thanks for the help.</p>