Check for Null in a gridview
<p>I am storing a image datatype in my DB.
But while checking it </p>

<pre><code> &lt;asp:LinkButton ID="lbEvidence" runat="server"
                        Text='&lt;%# CheckNull (Eval("Evidence")) %&gt;'
</code></pre>

<p>aspx.cs</p>

<pre><code>protected string CheckNull(object objGrid)
        {   // checks whether there is evidence file or not

            if (object.ReferenceEquals(objGrid, DBNull.Value))
            {
                return "";

            }
            else
            {
                return "Record Found";             
            }
        }
</code></pre>

<p>Even when the image in the DB is NULL, here objgrid takes a value System.Byte[4] and returns Record Found. 
Works fine when the image is not null</p>

<p>Any hints
Sun</p>
