ASP.NET Repeater Eval
<p>I trying to execute the follow code in .aspx page:</p>

<pre><code>&lt;asp:Repeater ID="rptComentarios" runat="server"&gt;
            &lt;ItemTemplate&gt;
                &lt;% if (Convert.ToInt32(Eval("int_tipo")) == 1)
                   { %&gt;
                                        &lt;div class="resp"&gt;
            &lt;div class="top"&gt;
            &lt;/div&gt;
            &lt;div class="cont-resp"&gt;
                &lt;h3&gt;
                    &lt;%# Eval("txt_nome") %&gt;&lt;/h3&gt;
                &lt;p&gt;
                 &lt;%# Eval("txt_comentario") %&gt;&lt;/p&gt;
            &lt;/div&gt;
        &lt;/div&gt;
                   &lt;% }
                   else
                   {%&gt;
                               &lt;div class="usuario"&gt;
            &lt;div class="top"&gt;
            &lt;/div&gt;
            &lt;div class="cont-usuario"&gt;
                &lt;h3&gt;
                       &lt;%# Eval("txt_nome") %&gt;&lt;/h3&gt;
                &lt;p&gt;
                    &lt;%# Eval("txt_comentario") %&gt;&lt;/p&gt;
            &lt;/div&gt;
        &lt;/div&gt;
                   &lt;% } %&gt;
            &lt;/ItemTemplate&gt;
            &lt;/asp:Repeater&gt;
</code></pre>

<p>It throws an exception in runtime in first line:</p>

<pre><code>  &lt;% if (Convert.ToInt32(Eval("int_tipo")) == 1)
</code></pre>

<p>System.InvalidOperationException: Databinding methods such as Eval(), XPath() och Bind() can only be used in the context of a databound control.</p>

<p>Whats wrong?Any ideias?</p>
