I have a button. When I click on it, a controller should be invoked and a function called, which should return either true or false.
How should I indicate it in the UI?
I.e. if the function returns true, I want to write "Success" in the UI. If it returns false then I'd like to write "Failed" in the UI.
How could I do that?
[HttpPost]
public ViewResult DoSomething()
{
//Call to method
}
@using (Html.BeginForm("DoSomething", "Controller")) {
}