I have the following markup:
<ul class="nav nav-tabs">
<li>@Ajax.ActionLink("Home", "Index", "Home", new AjaxOptions { UpdateTargetId = "updaterDiv", OnSuccess = "function() {alert('onsuccess fired'); }"}) </li>
...
<div id="updaterDiv" style=" height: 200px; width: 200px;">
</div>
And the Index action in the HomeController
public ActionResult Index()
{
if (Request.IsAjaxRequest())
{
return PartialView("_RefreshedHandler");
}
return View();
}
The OnSuccess event in the AjaxOptions is not getting fired when I click on the link. What am I doing wrong? What I am trying to achieve, is to avoid doing a postback and update on the entire page when the link is clicked, but rather only update defined a section