Set ImageButton's visibility using Eval
<p>I am trying to set the ImageButton visible property. </p>

<pre><code>&lt;asp:ImageButton ID="img_DataDeleted" runat="server" Visible='&lt;%# !Convert.ToBoolean(Eval("IsDeleted")) %&gt;' CausesValidation="false" CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete this record?');" Text="Delete" ImageUrl="~/Images/Delete_btn.gif" ToolTip="Delete this record" /&gt;
</code></pre>

<p>This works fine when the record is deleted</p>

<p>I am trying to add,</p>

<pre><code> &amp;&amp; !Convert.ToBoolean(Eval("DataID" == '1')) 
</code></pre>

<p>so if DataID is 1 I want the ImageButton to be invisible  </p>

<p>(DataID data type is int) </p>
