Test System.Web.Authorization From Code
<p>Inside a web.config file, you can control user/role authorization like this:</p>

<pre><code> &lt;location path="MyPage.aspx"&gt;
  &lt;system.web&gt;
    &lt;authorization&gt;
      &lt;allow users="User1"/&gt;
    &lt;/authorization&gt;
  &lt;/system.web&gt;
&lt;/location&gt;
</code></pre>

<p>An asp.net menu will automatically filter out pages that aren't authorized for the current user, but <strong>how can I check in my code if they have the correct permissions?</strong>  </p>

<p>I'd like to disable or hide links that they don't have access to.</p>
