Code below:
[HttpGet]
public ActionResult Edit(string id="")
{
}
[HttpPost]
public ActionResult Edit(string itemId="", EditViewModel viewModel)
{
RedirectToAction("Edit", new { id = itemId });
}
returns an error: "Optional parameters must appear after all required parameters".
I assume it is trying to redirect the [HttpPost] action.
How to redirect to [HttpGet] action?
I am trying to implement a save function when it saves the edit and reloads the form with the new values.
Lukep source
share