title: Casting Eval("bitValue") as Bool
body: <p>I have a list view with a HyperLink control within the ItemTemplate. I want to display the link if a returned value is 0 (false), and not display the link if it is 1 (true).</p>
  
  <p>So far I have this:</p>
  
  <pre><code>&lt;asp:HyperLink runat="server" ID="lnkReview"
    NavigateUrl='&lt;%# Eval("EnquiryID", @"selectcompany.aspx?enq={0}")%&gt;'
    Text="Review Enquiry"
    Visible='&lt;%# ((bool)Eval("Locked"))==true? false : true %&gt;' /&gt;
  </code></pre>
  
  <p>...but this renders an 'Specified cast is not valid' exception.</p>
  
  <p>Examples I've seen elsewhere suugest this should work. I can confirm that the Locked column only returns 0 or 1 (from SQL Server) - surely these should be easily cast from bit/int to bool??</p>