C# Microsoft JScript 运行时错误:“Sys.Extended.UI”为空或不是对象
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14562451/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Microsoft JScript runtime error: 'Sys.Extended.UI' is null or not an object
提问by A.Goutam
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
Microsoft JScript 运行时错误:“Sys.Extended.UI”为空或不是对象
<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.
谁能告诉我是什么问题。我试过了,但我还没有找到。
采纳答案by Alex Filipovici
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.
您是否尝试过使用较新版本的AjaxControlToolkit
? 我正在使用 ( )4.5.7.123
3.5.7.123
并且此问题不存在。
Also, you might want to take a look at this solution:
此外,您可能想看看这个解决方案:
回答by user1156327
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.
我在使用 .NET 4.0 解决方案时看到过这个错误,我引用的 AjaxControlToolkit.dll 文件是 v4.5.xy 当我尝试使用 v4.1.vw 的 AjaxControlToolkit.dll 文件时,错误消失了,其中我不记得 x、y、v 和 w 是什么。
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.
要找出 AjaxControlToolkit.dll 文件的版本,请在将其添加为 Reference 后右键单击它,然后选择 Properties -- 有一个名为 Version 的属性会告诉您。
回答by Er. ?ridy
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.
我收到此错误是因为我在某处使用了 ScriptManager 而不是 ToolkitScriptManager。当我用 Took kit 脚本管理器应用程序替换脚本管理器的那一刻开始工作正常。
Hope this helps someone!
希望这可以帮助某人!
回答by SHS
I have just resolved the "'Sys.Extended.UI' is null or not an object" problem by adding the directive:
我刚刚通过添加指令解决了“'Sys.Extended.UI'为空或不是对象”的问题:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
which was missing in .aspx code for some reason.
由于某种原因,它在 .aspx 代码中丢失了。
And by replacing <asp:ScriptManager ID="ScriptManager1" runat="server" />
并通过替换 <asp:ScriptManager ID="ScriptManager1" runat="server" />
with
和
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ToolkitScriptManager" EnablePartialRendering="true"></ajaxToolkit:ToolkitScriptManager>