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. Image for the cookie policy date

Dialog from code behind throws System.ArgumentNullException


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.

1 Reply

SS Selvamani Sankarappan Syncfusion Team 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 

Live Chat Icon For mobile
Up arrow icon