I need to show the notification on my razor page. The message comes from the controller. Below is what I have:
public ActionResult Index()
{
if (test == "Success")
return View("Successfully stored);
else
return View("failed to store");
}
On My razor page, I want to show the Success notification message when test is Success otherwise show the failure message. How can I achieve this. I don't want to click any button to show the success and failure notification.