Set Visible property of div with an inline-tag
<p>I'm trying to set the Visible property of a div with runat='server' attribute, directly from the code in the page, by calling a function in the code behind, but it seems the code is not evaluated at all by the server. 
The code looks like this</p>

<pre><code>&lt;div id="mydiv" runat="server" Visible='&lt;%# IsInRole("User") %&gt;'&gt;
</code></pre>

<p>Where 'IsInRole' is a protected function on the page that return a bool.</p>

<p>Many Thanks</p>

<p>FOUND SOLUTION:</p>

<pre><code>&lt;% if (IsInRole("Administrator")){%&gt;
    &lt;div id="mydiv"&gt;Admin content here&lt;/div&gt;
&lt;% }%&gt;
</code></pre>
