title: ASP.NET MVC Check role inside view
body: <p>In my View I have some admin links that I would like to hide and show based on user role how can do this inside the view e.g.</p>
  
  <pre><code>&lt;%= if(CHECK IF USER ROLE ADMIN) { %&gt;
          &lt;div class="tools"&gt;
              &lt;ul&gt;
                  &lt;li class="edit"&gt;&lt;%= Html.ActionLink("Edit", "Edit", new { id = Model.storyId }) %&gt;&lt;/li&gt;
                  &lt;li class="delete"&gt;&lt;%= Html.ActionLink("Delete", "Delete", new { id = Model.storyId }) %&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
  &lt;%= } %&gt;
  </code></pre>