I'm trying to redirect to a post method from another post method, but it seems it's trying to redirect by Get:
[HttpPost]
[Route("Users/NewUser")]
[SystemAuthorize(PermissionForm = Form.USERS, Permissions = PermissionValue.EDIT)]
public ActionResult NewUser(ConsultUserModel m) //This is called from Consult View by post
{
Debug.WriteLine("I'm here post");
UserInfoModel model = GetUserInfoModel();
return RedirectToAction("Edit", model );
}
[HttpPost]
[Route("Users/Edit")]
[SystemAuthorize(PermissionForm = Form.USERS, Permissions = PermissionValue.EDIT)]
public ActionResult Edit(UserInfoModel edit)
{
return View(edit);
}
When I call the action results in Server Error: