title: How to assign user roles and hide buttons from users who are not in a role, asp.net
body: <p>I know it's a lot of articles about roles and authorization but I need something different and I can't find anything so far..
  I'm working on a Web application built in ASP.NET, C# behind and a MySQL database connected.</p>
  
  <p>So what I need is just a simple check somewhere(web.conf or Default.aspx.cs, I don't know)</p>
  
  <pre><code>if user "admin" (i.e inRole="admins") -&gt; give permissions to everything
  if user normalUser1 (i.e inRole = "users) -&gt; HIDE 2 buttons 
  </code></pre>
  
  <p>so they are not able to click them.</p>
  
  <p>The example:
  Admins can click a button Upload and Delete which access the database behind
  Users can not click Upload or delete, maybe hide the button it self</p>
  
  <p>If you have any ideas.</p>