1
votes

Step 1- We have merge 1) jquery-1.7.2.js, 2) jquery.unobtrusive-ajax.js, 3) jquery.validate.js, 4) jquery.validate.unobtrusive.js In Single file using online js compressing tool. And saved that new file in our application script folder.

Step 2- When we are using new file in our application by using " script src="Domain_Path"+"/Scripts/CDNScripts/jqueryval.js" type="text/javascript">"/script> Its working very good.

Step 3- BUT when we are using bundling and CDN like below. bundles.UseCdn = false; string JqueryvalCND = "Domain_Path" + "/Scripts/CDNScripts/jqueryval.js"; bundles.Add(new ScriptBundle("~/bundles/jqueryval", JqueryvalCND).Include( "~/Scripts/CDNScripts/jqueryval.js"));

    **It producing error "'jQuery' is undefined "**

Please suggest urgent

1
try changing the order of including bundles - Grundy

1 Answers

0
votes

You need to include your bundle in your page too :

Razor : @Scripts.Render("~/bundles/jqueryval")

Web Forms : <%: Scripts.Render("~/bundles/jqueryval") %>