当我运行我的代码时,我得到了错误:
Unable to get value of the property 'unobtrusive': object is null or undefined
这是正常的,但我正在添加我需要的所有jquery东西:
jquery.validate-vsdoc.js jquery.validate.js jquery.validate.min.js jquery.validate.unobtrusive.js jquery.validate.unobtrusive.min.js jquery.unobtrusive-ajax.js jquery.unobtrusive-ajax.min.js
我在主表单上加载:
@Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval")
我的捆绑配置有:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.unobtrusive*","~/Scripts/jquery.validate*"));
为什么我收到此错误?
评论如果您需要查看任何文件,我会很乐意发布它
编辑:
脚本已加载(我已检查)
这一行给出了错误:
jQuery.validator.unobtrusive.prototype.parse.call(this,selector);
错误:
SCRIPT5007: Unable to get value of the property 'unobtrusive': object is null or undefined