title: ASP.NET using Bind/Eval in .aspx in If statement
body: <p>in my .aspx I'm looking to add in an If statement based on a value coming from the bind. I have tried the following:</p>
  
  <pre><code>&lt;% if(bool.Parse(Eval("IsLinkable") as string)){ %&gt;                    
          monkeys!!!!!!
          (please be aware there will be no monkeys, 
          this is only for humour purposes)
   &lt;%} %&gt;
  </code></pre>
  
  <p>IsLinkable is a bool coming from the Binder. I get the following error:</p>
  
  <pre><code>InvalidOperationException
  Databinding methods such as Eval(), XPath(), and Bind() can only
  be used in the context of a databound control.
  </code></pre>