@Ajax.ActionLink not replacing partial view

For people who installed Microsoft.jQuery.Unobtrusive.Ajax(trough nu-get or not) and want to use it through a bundle, don't forget:

  • To add the library in your bundleconfig. For example:

            bundles.Add(new ScriptBundle("~/bundles/unobtrusive").Include(
                     "~/Scripts/jquery.unobtrusive*"));
    
  • To Render it (mine is rendered in _Layout.cshtml):

    @Scripts.Render("~/bundles/unobtrusive")

I know its an old post, but can't hurt to add additional information, I guess.


If it is MVC5? Make sure you include the correct unobtrusive ajax package i.e.,You can install NuGet package manager console with latest package

Install-Package Microsoft.jQuery.Unobtrusive.Ajax

After installing the latest one,its started working for me.


Believe it or not, I had everything setup correctly, except for one thing:

To install Microsoft jQuery Unobtrusive Ajax, run the following command in the Package Manager Console:

PM> Install-Package Microsoft.jQuery.Unobtrusive.Ajax -Version 3.2.2 

Instructions are here: https://www.nuget.org/packages/Microsoft.jQuery.Unobtrusive.Ajax/