Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

MVC 5 Ajax.BeginForm everything in place including needed libraries to UpdateTarget X but entire page posted anyway

$
0
0

Hi,

I got an MVC 5 view which I'm using Ajax.BeginForm which is as follow :

@using (Ajax.BeginForm("Index", "DrugAdministration", new AjaxOptions() { HttpMethod = "GET", InsertionMode = InsertionMode.Replace, UpdateTargetId = "DispillsView" }))

The libraries are Render via the BundleConfig so here's my bundle :

bundles.Add(new ScriptBundle("~/bundles/FADM").Include("~/Scripts/CustomScripts/jquery-{version}.js","~/Scripts/CustomScripts/jquery-ui*","~/Scripts/CustomScripts/jquery-unobstrusive*","~/Scripts/CustomScripts/jquery-validation*","~/Scripts/CustomScripts/jquery.kinetic.min.js","~/Scripts/CustomScripts/jquery.smoothTouchScroll.min.js","~/Scripts/CustomScripts/jquery-ui-touch.js","~/Scripts/CustomScripts/modernizr-*", // ready for produc"~/Scripts/CustomScripts/bootstrap.js","~/Scripts/CustomScripts/respond.js"

Now when the form is posted, it is suppose to refresh only my Partial view since in my controller I have the following code :

if (Request.IsAjaxRequest())
    return PartialView("_Dispills", DrugAdmin);

However the IsAjaxRequest() is never true !


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>