c# - MVC5 bundles not registering the proper AJAX files -


the scripts needed ajax.actionlink call not registering on production server. ajax.action link works on development environment. not seeing jquery.unobtrusive file listed in scripts see jquery.validate.unobtrusive. tried adding bundle instead still no luck. can me these bundles setup correctly. have listed files in scripts folder below. bundleconfig.cs:

    public static void registerbundles(bundlecollection bundles)     {         bundles.add(new scriptbundle("~/bundles/jquery").include(                     "~/scripts/jquery-{version}.js"));         bundles.add(new scriptbundle("~/bundles/jqueryajax").include(                 "~/scripts/jquery.unobtrusive*"));         bundles.add(new scriptbundle("~/bundles/modernizr").include(                     "~/scripts/modernizr-*"));         bundles.add(new scriptbundle("~/bundles/bootstrap").include(                   "~/scripts/bootstrap.js",                   "~/scripts/respond.js"));         bundles.add(new stylebundle("~/content/css").include(                   "~/content/bootstrap.css",                   "~/content/site.css"));         bundles.add(new scriptbundle("~/bundles/bootstrap").include(                       "~/scripts/bootstrap.js",                       "~/scripts/respond.js",                       "~/scripts/bootstrap-datepicker.js",                       "~/scripts/datepickerready.js"                       ));         bundles.add(new stylebundle("~/content/css").include(                              "~/content/bootstrap.css",                              "~/content/bootstrap-datepicker3.css",                              "~/content/site.css"                              ));     } 

in _layout.cshtml:

@styles.render("~/content/css") @scripts.render("~/bundles/modernizr") @scripts.render("~/bundles/jquery") @scripts.render("~/bundles/bootstrap") @scripts.render("~/bundles/jqueryajax") 

here files have listed in scripts directory: script files in project

here screenshot of missing files when loading page: html source:

debugging result:

here ajax.actionlink call in case needed:

@ajax.actionlink("+add activity type", "createnewtype", new ajaxoptions                     {                         updatetargetid = "divtypes",                         insertionmode = insertionmode.insertafter,                         httpmethod = "post"                     }) 

thanks in advance help.

i went through though file structure , found jquery.unobtrusive.ajax file in project , copied working directory on development server , came life.

i deleted , added scripts folder right clicking , choosing add existing item. once re-published worked well, , better solution in case needs redeployed later.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -