title: show html elements based on user's role
body: <p>I am trying to hide html elements from plain users such that only users.
  I have  simple asp.net web form setup that makes use of roles provider and membership.</p>
  
  <pre><code>&lt;li runat="server" id="li1" visible ='&lt;%# HttpContext.Current.User.IsInRole("admin") %&gt;'&gt;&lt;a href="screeners.aspx"&gt;&lt;span&gt; Admin link&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I also am trying this without success:</p>
  
  <pre><code>&lt;li runat="server" id="liAdminUsers" visible ='&lt;%# isAdmin %&gt;'&gt;&lt;a  href="screeners.aspx"&gt;&lt;span&gt; The Hopper&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>the code behind is:</p>
  
  <pre><code>public bool isAdmin =false;
              protected void Page_Load(object sender, EventArgs e)
              {
  
                  isAdmin = Page.User.IsInRole("admin");
                         }
  </code></pre>
  
  <p><strong>update:</strong> I know I can get it working by adding in the code behind:</p>
  
  <pre><code>liAdminUsers.Visible = false ;
  </code></pre>
  
  <p>but want a UI solution in the .aspx code</p>