UFrame Not Working With AJAX.NET

Jul 31, 2008 at 8:15 PM
I've been trying this UFrame thingy and I got it to work, but I'm getting an error with AJAX.NET. Here's my setup:

1. I have a Master page that has a header and footer control. The header control uses the AJAX toolkit from Microsft's AJAX.NET.
2. The content page calls UFrame by setting the src attribute to another ASPX page. This other ASPX page serves as a wrapper for a user control.

This works. I load the page and it loads very fast. The UFrame shows a loading gif while it's pulling some content from Flickr (using the VS2005 example included in the source code files).

However, the problem I'm having occurs when I navigate away from the page. I get the following error:

A Runtime Error has occurred.
Do you wish to Debug?

Line: 157085060
Error: Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.TextBoxWatermarkBehavior' cannot be converted to type 'Sys.UI.Behavior'.
Parameter name: instance

So whatever the the UFrame cleanup code is doing is fighting with the AJAX.NET code. Has anyone else encountered this problem and what solutions can I take to fix this?

Jan 27, 2009 at 6:50 AM
I am also facing same problem with ajax.net and uframe . anybody got the solution for this?
Apr 22, 2009 at 10:04 PM
Edited Apr 22, 2009 at 10:05 PM
I am having the same problem.  Here's my observation:
I have an .aspx page that has a bunch of UFrames in it.  Within those UFrames I am using the AjaxControlToolkit Calendar Extender, and it works great!  The problem is that I get a JS error when I try to use a Calendar Extender on the main page.  I get the following error:
Sys.Argument.TypeException: Object of type 'AjaxControlToolkit.CalendarBehavior' cannot be converted to type 'Sys.UI.Behavior'
I get a similar error when trying to expand a CollapsiblePanel extender: 
Sys.Argument.TypeException: Object of type 'AjaxControlToolkit.Animation.LengthAnimation' cannot be converted to type 'AjaxControlToolkit.Animation.PropertyAnimation'

Any help would be greatly appreciated.  Thanks!
Jul 18, 2009 at 12:29 PM

I had a similar problem but with the ajax autocomplete control. I made it work in IE 7.

The solution is to set the ScriptMode property of the ScriptManager to Release.
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release"></asp:ScriptManager>

I tried running it in Firefox 3 and its working however when I try to submit my form, it saves correctly but looking in Firebug, it shows 3 errors (And the code where it is located is out of range--weird):

  • ob.ToString is not a function
  • Sys.WebForm is undefined
  • Sys.Timer is not a constructor

Anyway, I'm not sure the real impact of that error (performance maybe) in firefox and maybe there is a client script error happening under the hood in IE even if it looks like its working in the display experience. And I'm not sure why setting ScriptMode=Release is making the error disappear. Hopefully a Microsoft resource can read this thread and keep a better explanation on this.

Hope it helps! :)