Using Eval inside a IF statement and Repeater
<p>I am trying to use Eval inside a IF Statement and Repeater.</p>

<p>I want to do something like this:</p>

<pre><code> &lt;asp:Repeater runat="server" ID="rpRepeater"&gt;
      &lt;ItemTemplate&gt;
           &lt;% if ((bool)Eval("A_Boolean"))
              { %&gt;
                blah...
           &lt;% } %&gt;
      &lt;/ItemTemplate&gt;
 &lt;/asp:Repeater&gt;
</code></pre>

<p>This code gives me the following error:</p>

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