Looking for a solution I found a form on the link Controller message for the view
But my problem is that nothing is displayed. I do not know if it's because I do not have an action in View but the message does not appear.
The structure is set up in this way (the base structure of the previous link was maintained and mounted almost the same):
Controller
public ActionResult Relatorios()
{
ViewBag.Message = "Mensagem";
ViewBag.TipoUser = 1;
this.FlashInfo(this, "Mensagem de Informação.");
this.FlashWarning("Mensagem de Aviso.");
this.FlashError("Mensagem de Erro.");
}
Inside the View I only have the following code:
@model dynamic
@{
ViewBag.Title = "Relatórios";
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
Report Management
Within _Layout
put within the following segment
<div class="container-fluid" style="margin-left: 10px; margin-right:5px; margin-bottom: 10px; margin-top: 10px">
@Flash.FlashMessage(TempData)
<div id="flash">
</div>
@RenderBody()
<hr/>
<footer style="margin-top: 10px">
<p>© @DateTime.Now.Year - Empresa</p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/site")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/inputmask")
@Scripts.Render("~/bundles/maskedinput")
@RenderSection("scripts", required: false)
</body>
</html>
Can anyone help me?