Hi guys,

It’s been a while since I wrote a post here and that’s not because of a lack of good ideas but from a lack of time :)

What I want to talk about today is about an issues with MS.Ajax and IFrame’s. To be more precise, UpdateProgress and IFrames.

When a page contains an IFrame and both the page and the IFrame contain an UpdateProgress control, when an Ajax callback occurs, the Ajax engine tries to link the UpdateProgress control to the panel that contains the progress image.The problem is that you have two UpdateProgress controls and on the second one you would get an error in the  MicrosoftAjax.js file, more exactly in this function:

Sys.UI.Control = function Sys$UI$Control(element)
{
   /// <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;
   this._oldDisplayMode = this._element.style.display;
   if (!this._oldDisplayMode || (this._oldDisplayMode == ‘none’))
  {
      this._oldDisplayMode = ”;
   }
}

The red code is where it crashes. So what is the sollution for this ? : use a single update progress, maybe in the masterpage if you have such thing.

 Cheers

Leave a Reply