ASP.NET linkbutton visible property issue
<p>Hi
I'm using a public variable called IsAdmin in the code behind of an aspx page.</p>

<pre><code> public partial class _news : System.Web.UI.Page
{
    public bool IsAdmin = false;
    protected void Page_Load(object sender, EventArgs e)
    {

    if (User.Identity.Name.Contains("admin"))
    {
        IsAdmin = true;
    }
    else
    {
        IsAdmin = false;
    }
 }
</code></pre>

<p>And i use the property Visible='&lt;%#IsAdmin%>' to assign to panels which i want to show if the user is an admin in the aspx design of the page. Strangely it works for the linkbuttons i've put on the repeater.</p>

<pre><code> &lt;asp:Panel ID="Panel1" runat="server" Visible='&lt;%#IsAdmin%&gt;'&gt;
 &lt;asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl='&lt;%# "news_edit.aspx?     Action=edit&amp;id=" + Convert.ToString( Eval("news_id")) %&gt;Edit&lt;/asp:LinkButton&gt;

 &lt;asp:LinkButton ID="LinkButton3" runat="server" PostBackUrl='&lt;%# "news.aspx?Action=delete&amp;id=" + Convert.ToString( Eval("news_id")) %&gt;'&gt;Delete&lt;/asp:LinkButton&gt;
        &lt;/asp:Panel&gt;
</code></pre>

<p>and it works fine, however outside the repeater i've put another linkbutton without a panel </p>

<pre><code> &lt;asp:LinkButton ID="LinkButton4" runat="server" PostBackUrl="~/news_edit.aspx?action=new" Visible='&lt;%#IsAdmin%&gt;'&gt;Add New Item&lt;/asp:LinkButton&gt;
</code></pre>

<p>but the visible property doesn't work on it! I tried putting it inside a panel too and setting it's visible property but that too didn't work. </p>

<p>So i have following doubts</p>

<p>1)what is the issue?
2)what is the technical name when we use references like '&lt;%#IsAdmin%>' in the design page
3)Does page load happen before page is rendered of after page is rendered?</p>

<p>Thanks</p>
