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 !