Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why the code is still executing?
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Why the code is still executing?
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01659452
Message ID:
01659452
Views:
52
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
Reply
Map
View

Click here to load this message in the networking platform