Get String From CodeBehind
<p>What is the difference between <code>&lt;%#...%&gt; and &lt;%=...%&gt;</code> ? For example I wanted to take the username of the logged in user and I tried with <code>"&lt;%# Membership.GetUser().UserName %&gt;"</code> but this didn't work. Then I tried with <code>&lt;%= Membership.GetUser().UserName %&gt;</code> and with this works. Why with the first try (<code>"&lt;%# Membership.GetUser().UserName %&gt;"</code>) didn't work but the second works fine (<code>&lt;%= Membership.GetUser().UserName %&gt;</code>) ?</p>

<p>With this code didn't work I can't get the field from "<code>Membership.GetUser().UserName</code>":</p>

<pre><code>&lt;div id="profileHeader"&gt;
    &lt;h1&gt;&lt;%# Membership.GetUser().UserName %&gt;&lt;/h1&gt;
&lt;/div&gt;
</code></pre>

<p>With this code work I can get the field from "<code>Membership.GetUser().UserName</code>":</p>

<pre><code>&lt;div id="profileHeader"&gt;
    &lt;h1&gt;&lt;%= Membership.GetUser().UserName %&gt;&lt;/h1&gt;
&lt;/div&gt;
</code></pre>
