mam link na siatce w moje AdminUsers zobaczyćRedirecttoAction z komunikatem o błędzie
grid.Column(header: "", format: (item) => (condition ? Html.ActionLink("Impersonate", "Impersonate", "Admin", new { id = item.username }, null) : Html.Label("Impersonate"), style: "webgrid-column-link"),
W regulatorze mam
public ActionResult Impersonate(string id)
{
string result = ORCA.utilities.users.setImpersonation(id);
if(result == "nocommonfields")
return RedirectToAction("AdminUsers", "Admin");
else
return RedirectToAction("terms_of_use", "Forms");
}
W jaki sposób można wysłać komunikat o błędzie, aby wyświetlić kiedy wrócę do na stronie AdminUsers?
jest to możliwe do domyślnego powrót błędy sprawdzania poprawności z tempdata i pokazywanie błędów w ValidationMessageFor element? –