I'm working in ASP.NET MVC 5. I'm showing a loader during a form submit using a Ajax.BeginForm:
@using (Ajax.BeginForm("Filter", "Log", new AjaxOptions() { OnSuccess = "reloadGrid", OnFailure = "notifyError", HttpMethod = "POST", LoadingElementId = "myModalLoader", OnBegin= "showLoader();", OnComplete = "hideLoader();" }, new { @id = "filter-form" }))
I'm trying to do the same thing in another web page where I've a Html.BeginForm:
@using (Html.BeginForm( "Index", "GestioneImmagini", FormMethod.Get, new AjaxOptions() { HttpMethod = "GET", LoadingElementId = "myModalLoader", OnBegin = "showLoader();", OnComplete = "hideLoader();" }))
But onBegin and OnComplete don't fire.
Do you know the reason? Can I use AjaxOptions in Html.BeginForm?
Thanks
Simone