mvc render partial view in layout stackoverflow code example
Example: mvc render partial view in layout stackoverflow
public ActionResult AdminMenu()
{
var am = _amr.GetAdminMenu();
return Json(am,JsonBehaviour.AllowGet);
}
@using (Ajax.BeginForm("AdminMenu","AdminController", null,
new AjaxOptions
{
OnSuccess = "renderSuccess",
OnFailure = "renderFailure",
OnBegin = "renderBegin"
},
new
{
id = "frmViewerAdminMenu",
name = "frmViewerAdminMenu"
})
)
{
...
<script type="text/javascript">
function renderSuccess(ajaxContext){
}
</script>
...
}