Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why the code is still executing?
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Why the code is still executing?
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01659452
Message ID:
01659452
Vues:
51
UPDATE. Never mind, I've changed this code to use @IF @ViewBag.ShowMenu

Hi everybody,

I have the following code in my page
<!-- Sidebar -->
        <div class="sidebar navbar-collapse" id="divMainMenu" 
             ng-if="'@ViewBag.ShowMenu'">
            <!--- Sidebar navigation -->
            @Html.Action("MainMenu", "Menu", new { area = "" })
        </div>
I can see that @ViewBag.ShowMenu = false at the time the code is running. However, the MainMenu is still executing. What should I do to prevent its execution in that case completely?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform