Hello,
I run into the problems after I've made update of the Infragistics components to the latest version.
If I have two or more WebDialogs on the page, I have such bug:
Invalid JSON primitive: ,[[[[[null,"Edit",null,null]],[[[[[]],[],[]],[{},[]],null],[[[[]],[],[]],[{},[]],null],[[[[]],[],[]],[{},[]],null]],[]],[{},[]],null],[[[[null,null,null,null,null]],[],[]],[{},[]],null]],[]],[{},[]],null]. 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. Exception Details: System.ArgumentException: Invalid JSON primitive: ,[[[[[null,"Edit",null,null]],[[[[[]],[],[]],[{},[]],null],[[[[]],[],[]],[{},[]],null],[[[[]],[],[]],[{},[]],null]],[]],[{},[]],null],[[[[null,null,null,null,null]],[],[]],[{},[]],null]],[]],[{},[]],null].Source Error: 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. Stack Trace: [ArgumentException: Invalid JSON primitive: ,[[[[[null,"Edit",null,null]],[[[[[]],[],[]],[{},[]],null],[[[[]],[],[]],[{},[]],null],[[[[]],[],[]],[{},[]],null]],[]],[{},[]],null],[[[[null,null,null,null,null]],[],[]],[{},[]],null]],[]],[{},[]],null].] System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +542622 System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +37 System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input) +13 Infragistics.Web.UI.Framework.RunBot.HandleOnInit(HttpContext context) +232 Infragistics.Web.UI.Framework.ControlMain.OnInit(EventArgs e) +158 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Control.InitRecursive(Control namingContainer) +210 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Also I've found that if <asp:ScriptManager ID="ScriptManager1" runat="server" ></asp:ScriptManager> ScriptMode is not "Release", than we have the MS Script error for the id of the second dialog// Name: MicrosoftAjax.debug.js// Assembly: System.Web.Extensions// Version: 3.5.0.0// FileVersion: 3.5.30729.196//-----------------------------------------------------------------------// Copyright (C) Microsoft Corporation. All rights reserved.//-----------------------------------------------------------------------// MicrosoftAjax.js// Microsoft AJAX Framework.....Sys.UI.Control = function Sys$UI$Control(element) { /// <summary locid="M:J#Sys.UI.Control.#ctor" /> /// <param name="element" domElement="true"></param> var e = Function._validateParams(arguments, [ {name: "element", domElement: true} ]); if (e) throw e; if (typeof(element.control) != 'undefined') throw Error.invalidOperation(Sys.Res.controlAlreadyDefined); Sys.UI.Control.initializeBase(this); this._element = element; element.control = this;}id="EditDialog"
If we have just the one dialog on the page, we have no problem.
Hi,
If you may build a simple application (probably only aspx file), which can be used to reproduce that issue, then please submit a report at http://ko.infragistics.com/support/ask-for-help.aspx
You also may use "Options" to attach a zipped file, though, report is preferrable.
Hi, sorry to bump up an old thread, but I am seeing the same problem as well with the webDialog while trying to add it to my controls collection. happens only when i have more than one instance of the same control. System.ArgumentException: Invalid JSON primitive: ,|0|3,0,197px,26px,800px,530px,0||.at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)at System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input)at Infragistics.Web.UI.Framework.RunBot.HandleOnInit(HttpContext context)at Infragistics.Web.UI.Framework.ControlMain.OnInit(EventArgs e)at System.Web.UI.Control.InitRecursive(Control namingContainer)at System.Web.UI.Control.AddedControl(Control control, Int32 index)at System.Web.UI.ControlCollection.Add(Control child)Was a fix issued for this? thanks!
Hi John and ushatel,
I tried again to test samples with dialog, but I could not reproduce exception. I tested dialogs directly on page and wrapped into UpdatePanels. Tried various combinations of full and async postbacks in release and debug modes.In order to help, I need a sample to reproduce. Please, write a simple sample, zip aspx/cs files and attach it within Options tabs. Or submit a report at link which I mentioned last time.
My machine has slightly different version of MicrosoftAjax.debug.js, though, I do not think that makes difference.Under VisualStudio2008:// Name: MicrosoftAjax.debug.js// Assembly: System.Web.Extensions// Version: 3.5.0.0// FileVersion: 3.5.30729.5446
Under VisualStudio2010:// Name: MicrosoftAjax.debug.js// Assembly: System.Web.Extensions// Version: 4.0.0.0// FileVersion: 4.0.30319.17376
I tested following codes:
<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Width="300px" Height="200px"> <ContentPane> <Template> <asp:Button ID="Button1" runat="server" Text="Button" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </Template> </ContentPane> </ig:WebDialogWindow> <asp:Button ID="Button4" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <ig:WebDialogWindow ID="WebDialogWindow2" runat="server" Width="300px" Height="200px"> <ContentPane> <Template> <asp:Button ID="Button2" runat="server" Text="Button" /> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> </Template> </ContentPane> </ig:WebDialogWindow> </ContentTemplate> </asp:UpdatePanel> <asp:Button ID="Button3" runat="server" Text="Button" /></form>
Hi Victor,I should have added my script manager has an attribute "enablePartialRendering=false" . .could this have caused an issue?I am working on reproducing this. If i am able to reproduce this, I will package it and send it across.Thanks,John
Hi John,
Thank you for information.
I tested dialog in page with enablePartialRendering=false and reproduced exception. It happened on intial load and it was not related to dialog or multiple controls, but to a statement in base class of all Infragistics.Web.UI controls. It uses theForm global variable to attach submit events. That variable suppossed to be generated by server and set to the current form of page. But I found, that it is not generated if partial rendering is disabled.It is rather strange that similar problem was never reported or picked up by internal tests.
It will be fixed in coming service releases.
For now you may get around by adding following javascript block at the end of page:
<body> ... <script type="text/javascript"> if (!window.theForm) window.theForm = window.document.forms.form1 || window.document.forms[0]; </script></body>
Viktor,Thanks for clearing this up.I am attempting the workaround within my aspx page and it doesnt help. I have tried to set the theForm variable to as in the snippet you provided me and it hasnt cleared the bug. Is there another workaround? Thanks,John
Also, please do let me know in which service release this will be fixed. Thanks Vik!
and also for which versions of IG this service release (fix) will be applicable to. thanks!