@using (Ajax.BeginForm("Components", "Controller", new AjaxOptions { HttpMethod = "POST", OnFailure = "ShowError()", UpdateTargetId = "ShowSuccess()" }))
function ShowError() { $("#status").addClass("alert alert-error"); $("#status").removeClass(); $("#status").html("<strong>Error!</strong> There was an error posting the contact form. Please try again later."); } function ShowSuccess() { $("#target").removeClass(); $("#target").addClass("alert alert-success"); }
[HttpPost] public ActionResult Components(model objModel) { try { // } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)