Hi Jaimir,
Now I understand what happens. There is no need to submit a bug report to Infragistics.
The Infragistics controls in order to enable their client script under ScriptManager (AJAX) use the
System.Web.UI.ScriptManager.RegisterClientScriptInclude
method. But if script is not embedded in dll and it was not registered on full postback, then ScriptManager has issues with processing that new resource. You can verify that by following:
1. Create a simple "test.js" file which contains something like alert('test.js') or leave it blank, it does not matter what it has.
2. Remove percent editor from your test page and keep only panels and button.
3. Process OnPreRender event of Page and register that file conditionally (when UpdatePanel gets visible).
4. Run page, click a button which shows UpdatePanel and get the same exception as with percent editor (or any other control which uses local js resources).
Below is cs codes:
protected override void OnPreRender(EventArgs e)
{
if(this.UpdatePanel1.Visible)
System.Web.UI.ScriptManager.RegisterClientScriptInclude(this.UpdatePanel1, this.UpdatePanel1.GetType(), "myKey", "test.js");
base.OnPreRender(e);
}
If the only Infragistics controls used by your applications is that editor in initially hidden UpdatePanel, then you may try to get around that by explicit registration of js files used by editor. If your application uses controls created on initial load or full postback, then similar approach can bring problems, because it will lead to double instances of same js files (worst case with ig_shared.js). Example to fix that specific page with editor located in UpdatePanel1:
protected override void OnPreRender(EventArgs e)
{
if(!this.UpdatePanel1.Visible)
{
System.Web.UI.ScriptManager.RegisterClientScriptInclude(this.UpdatePanel1, this.UpdatePanel1.GetType(), "sharedKey", "ig_res/js/ig_shared.js");
System.Web.UI.ScriptManager.RegisterClientScriptInclude(this.UpdatePanel1, this.UpdatePanel1.GetType(), "editKey", "ig_res/js/ig_edit.js");
}
base.OnPreRender(e);
}