I am new to MVC and razor. I have an MVC 4 application. In the Shared -> _Layout.cshtml page, I have some content that I would like to hide if the user in not in the allowed list. How should I proceed?
I tried using something like this, but when I look at the running code, the parts between the <% %> are commented out.
<div>
    <a href="../Home/Index" style="color: White;">Home</a>
    <% if(*a condition*) { %>
        <a href="../Admin/Index" style="color: White;">Admin</a>
    <% } %>
</div>
Thank you
 
     
     
    