【发布时间】:2018-12-04 02:13:51
【问题描述】:
我使用 jQuery UI Draggable 插件对 MVC 网格中的项目重新排序。但是我收到错误“jQuery 脚本被多次附加并与 DevExpress 脚本混合。”
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
var jq112 = jQuery.noConflict(); //
</script>
我在 index 和 web.config 设置中使用了上面的代码,如下所示。
<settings rightToLeft="false" embedRequiredClientLibraries="true" doctypeMode="Xhtml" />
【问题讨论】:
-
能否提供web.config内容?我确定您在使用嵌入式脚本资源时使用
<script>标记多次加载 jQuery 脚本,因此我需要检查 web.config 以了解可能的第三方资源配置。 -
-
您使用的是哪个 DevExpress 版本?检查 web.config 中是否使用了
<section name="resources" ...>,然后由于embedRequiredClientLibraries="true"存在,尝试将其值设置为 false 并手动注册 jQuery 和 jQuery UI 脚本。 -
我们使用的是 18.1.3。我不愿意将 embedRequiredClientLibraries="true" 更改为 false,因为这可能会影响其他控件。 web.config 中也没有使用
标签: jquery asp.net-mvc devexpress devexpress-mvc