Call Alert When I Get a Value in the Session

0

Hello

I'm trying to call a javascript alert as soon as I get some value in a Session. I'm using C # with ASP.NET

Follow my code with the attempt to show the alert, but without success:

@if((string)Session["alertaErro"] != null)
{
    <script>
        function chamalerta() {
            bootbox.alert(@Session["alertaErro"]);
        }

        chamalerta();
    </script>
}
    
asked by anonymous 22.11.2017 / 18:50

0 answers