We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dialog from code behind throws System.ArgumentNullException

Thread ID:





124236 May 25,2016 10:35 PM UTC May 26,2016 06:07 AM UTC ASP.NET Web Forms 1
Tags: Dialog
Erick Ernesto Díaz Vargas
Asked On May 25, 2016 10:35 PM UTC


I'm trying to show a Dialog Control created from code behind like this thread but I get this error...

[ArgumentNullException: El valor no puede ser nulo. Nombre del parámetro: key]
   System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +11772221
   System.Collections.Generic.Dictionary`2.ContainsKey(TKey key) +9
   Syncfusion.JavaScript.EssentialJavaScript.RegisterControl(String id, String jsonData) +44
   Syncfusion.JavaScript.Control.RenderJson() +75
   Syncfusion.JavaScript.Control.Raw() +140
   Syncfusion.JavaScript.Control.ToHtmlString() +29
   Syncfusion.JavaScript.Web.Dialog.Render(HtmlTextWriter writer) +69
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13

This is my code...
    <div id="rptView" runat="server" name="rptView"></div>
    <ej:Button ID="btnReporte" runat="server" Text="Reporte"  OnClick="ShowDialog" /> 

    Protected Sub ShowDialog(Sender As Object, e As Syncfusion.JavaScript.Web.ButtonEventArgs)
        Dim dial As New Syncfusion.JavaScript.Web.Dialog()
        dial.ShowOnInit = True
        dial.IsResponsive = True
        dial.Title = "Preua"
    End Sub

Any help that can be provided would be appreciated.

Selvamani Sankarappan [Syncfusion]
Replied On May 26, 2016 06:07 AM UTC

Hi Erick,          
Thanks for Contacting Syncfusion Support, 
The reported issue will occur if you are using the collections of dictionary in your application. You cannot use a” null” for key even if your key is a “nullable” type. Please refer the following links:   
We have prepared the sample based on your code example. Please get the sample from the following location:   
If still you face any difficulties, then please revert us by modifying the sample along with the replication procedure in which we can able to reproduce the issue in our end.   
Selvamani S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon