Reputation: 3494
I have a problem on my page. When it opens, it displays the following error message:
Microsoft JScript runtime error: 'Sys.Extended.UI' is null or not an object
<ajax:ToolkitScriptManager ID="tsm" runat="server" CombineScripts="false" >
</ajax:ToolkitScriptManager>
and display error
$create(Sys.Extended.UI.ModalPopupBehavior, {"BackgroundCssClass":"modalBackground1","DropShadow":true,"PopupControlID":"ctl00_ContentPlaceHolder1_panelPopupAddDefaultAddress","PopupDragHandleControlID":"ctl00_ContentPlaceHolder1_panelPopupAddDefaultAddressDragHandle","dynamicServicePath":"/SJM.Framework.Website/Order/ActiveOrders.aspx","id":"ctl00_ContentPlaceHolder1_modalPopupAddDefaultAddress"}, null, null, $get("ctl00_ContentPlaceHolder1_hiddenTargetControlForModalPopup"));
Can anyone tell me me what is the problem is. I've tried, but I haven't found it.
Upvotes: 4
Views: 27852
Reputation: 11
I've solved this by setting the LoadScriptsBeforeUI
property to true like this:
<asp:ScriptManager ID="smMain" runat="server" LoadScriptsBeforeUI="true" ScriptMode="Release"></asp:ScriptManager>
Upvotes: 0
Reputation: 149
I have just resolved the "'Sys.Extended.UI' is null or not an object" problem by adding the directive:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
which was missing in .aspx code for some reason.
And by replacing <asp:ScriptManager ID="ScriptManager1" runat="server" />
with
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ToolkitScriptManager" EnablePartialRendering="true"></ajaxToolkit:ToolkitScriptManager>
Upvotes: 1
Reputation: 563
I got this error because somewhere I was using ScriptManager instead of ToolkitScriptManager. The moment i replaced Script Manager with Took kit script Manager application started working fine.
Hope this helps someone!
Upvotes: 5
Reputation: 11
I have seen this error when I was in a .NET 4.0 solution and the AjaxControlToolkit.dll file I was referencing was v4.5.x.y. The error went away when I tried an AjaxControlToolkit.dll file that was v4.1.v.w, where I don't recall what x, y, v, and w are.
To find out what version the AjaxControlToolkit.dll file is, right click on it after adding it as a Reference, and select Properties -- there is a Property called Version that will tell you.
Upvotes: 1
Reputation: 32571
Have you tried using a newer version of the AjaxControlToolkit
? I am using () 4.5.7.123
3.5.7.123
and this problem doesn't exist.
Also, you might want to take a look at this solution:
http://forums.asp.net/p/1209962/2132128.aspx#2132128
Upvotes: 2