I using this Ajax.BeginForm
<% using( Ajax.BeginForm( "Create","Mandate",
new AjaxOptions( ) {
OnSuccess = "GoToMandates",
OnFailure = "ShowPopUpError"
} ) ) {%>
<% } %>
What do I need to write in the controler to catch this OnSucces and OnFailure.
Because OnSuccess I need to show Success message
OnFailure I need to show othere message.
In my Controller
Public ActionResult GetSomething(FromCollection collection)
{
if(exists == null)
{
//OnSuccess
}
else
{
//OnFailure
}
}
Can anydboy help me out.. how to catch this?
Thanks
See Question&Answers more detail:os