title: Eval() and expression code
body: <p>I have such code in ASP.NET web page but when I run it I get error.</p>
  
  <pre><code>&gt;     Databinding methods such as Eval(), XPath(), and Bind() can only
  &gt; be used in the context of a databound control.
  </code></pre>
  
  <p>Where is the problem?</p>
  
  <pre><code>        &lt;% if (Helpers.GetInt(Eval("Price")) != 0)
             { %&gt;
          &lt;input type="button" name="btnSignUp" value="Sign Up - Plimus »" onclick="window.location='&lt;%#Eval("BuyUrl2")%&gt;&lt;%= Common.GetUserIdUrl("&amp;","custom_user_id") %&gt;'" /&gt;       
           &lt;%  } %&gt;
  </code></pre>
  
  <p>I get error code on line</p>
  
  <p>&lt;% if (Helpers.GetInt(Eval("Price")) != 0)</p>
  
  <p>I complete Repeater code is below. As I said early everything in this code works fine except <code>IF</code> statement. I want to evaluate <code>PRICE</code> and if it is <code>!=0</code> show button html code. </p>
  
  <pre><code>&lt;ItemTemplate&gt;
      &lt;div class="row"&gt;
          &lt;div class="col title"&gt;
              &lt;%#Eval("Title")%&gt;
          &lt;/div&gt;
          &lt;hr/&gt;
          &lt;div class="col price"&gt;
              &lt;%#string.Format("{0} USD/{1} &lt;/br&gt; Instant activation", Helpers.GetDecimal(Eval("Price")).ToString("N"), Portal.GetMembershipTypeLabel(Helpers.GetInt(Eval("Credits"))))%&gt;
          &lt;/div&gt;
          &lt;div class="col"&gt;
              &lt;input type="button" name="btnSignUp" value="Sign Up - PayPal »" onclick="window.location='&lt;%#Eval("BuyUrl1")%&gt;&lt;%= Common.GetUserIdUrl("&amp;","custom_user_id") %&gt;'" /&gt;
              &lt;br /&gt;
              &lt;br /&gt;
              &lt;% if (Helpers.GetInt(Eval("Price")) != 0)
                 { %&gt;
              &lt;input type="button" name="btnSignUp" value="Sign Up - Plimus »" onclick="window.location='&lt;%= Eval("BuyUrl2")%&gt;&lt;%= Common.GetUserIdUrl("&amp;","custom_user_id") %&gt;'" /&gt;       
               &lt;%  } %&gt;
  
          &lt;/div&gt;
           &lt;hr/&gt;
      &lt;/div&gt;
  &lt;/ItemTemplate&gt;
  </code></pre>