I have an Ajax Form that looks like this:
<% using (Ajax.BeginForm("Update", new AjaxOptions
{ UpdateTargetId = "message", InsertionMode = InsertionMode.Replace,
OnSuccess = "success", OnFailure = "error" })) { %>
I can get “error” to run on a failure but i would like to alert the error message. How can i get this information?
Thanks,
Kohan.
I’m assuming you’re returning a partialview in the method Update…
I think one of the simplest options would be to render the errors in the partial view you’re returning. This way everything happens on the server and you don’t have to handle the error display in two places.