JsonResult jsonResult = new JsonResult { Data = new { success = false, serverError = "500" }, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; jsonResult.ExecuteResult(controllerContext); httpContext.Response.End(); } else { httpContext.Response.Redirect("~/Error"); }
Dim jsonResult As JsonResult = New JsonResult With { .Data = New With {Key .success = False, Key .serverError = "500" }, .JsonRequestBehavior = JsonRequestBehavior.AllowGet } jsonResult.ExecuteResult(controllerContext) httpContext.Response.[End]() Else httpContext.Response.Redirect("~/Error") End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)