Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying to display a success View after the user has submitted their details within another View. I have placed a breakpoint at the action.
The action is called but the success View is never displayed!!! Code below;
public class ApplicantController : SufaceController
{ public ActionResult SubmitApplicatForm(ApplicationViewModel model) { if (ModelState.IsValid) { _applicantHelper.Create(model); }
return RedirectToAction("RenderSuccess", "Home"); }
} public class HomeController : SurfaceController { public ActionResult RenderSuccess() { return View("Success"); } }
@using (Ajax.BeginForm("SubmitApplicatForm", "Applicant", null, new AjaxOptions
{ HttpMethod = "POST", })) {
@Html.AntiForgeryToken()
}
Hey Tom, I have never tried to use the umbraco surface forms logic in combination with ajax calls, but this is a good piece of documentation on the umbraco surface forms logic https://our.umbraco.org/documentation/reference/templating/mvc/forms
Hope it helps.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Display another View after user has submitted their details
I am trying to display a success View after the user has submitted their details within another View. I have placed a breakpoint at the action.
The action is called but the success View is never displayed!!! Code below;
{ public ActionResult SubmitApplicatForm(ApplicationViewModel model) { if (ModelState.IsValid) { _applicantHelper.Create(model); }
} public class HomeController : SurfaceController { public ActionResult RenderSuccess() { return View("Success"); } }
{ HttpMethod = "POST", })) {
@Html.AntiForgeryToken()
}
Hey Tom, I have never tried to use the umbraco surface forms logic in combination with ajax calls, but this is a good piece of documentation on the umbraco surface forms logic https://our.umbraco.org/documentation/reference/templating/mvc/forms
Hope it helps.
is working on a reply...