title: Is it possible to hide a menu item based on user's role in MVC app (html menu list)?
body: <p>This question I've already been answered for webforms app, but can I hide my Administration menu item with this code ? Is it possible with sitemap binding or else ?</p>
  
  <p>my menu in : Layout.cshtml </p>
  
  <blockquote>
  <pre><code>    &lt;ul id="navlist"&gt;
          &lt;li class="first"&gt; &lt;a href="@Url.Content("~")" id="current"&gt;Home&lt;/a&gt; &lt;/li&gt;
  
          &lt;li&gt;
              &lt;a href="#"&gt;User&lt;/a&gt;
              &lt;ul class="second"&gt;
                  &lt;li&gt; &lt;a href="@Url.Content("~/Service/")"&gt;&gt; Services&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
  
          &lt;li&gt; 
              &lt;a href="#"&gt;Administration&lt;/a&gt;
              &lt;ul class="second"&gt;
                  &lt;li&gt;&lt;a href="@Url.Content("~/ServiceManager")"&gt;&gt; Services&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
  
          &lt;li&gt;@Html.Partial("_LogOnPartial") &lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  </blockquote>