How to hide image control when it has no URL?
<p>I had Repeater control which had image control sometimes this image control hadnot data and I want to hide it when it hadnot data I did the code but it displayed as image without data (Not avaliable ) please any one help me.
Note : That data come from data base so Img Had Id from database but without value (NULL)</p>

<pre><code>protected void DLHome_ItemDataBound(object sender, RepeaterItemEventArgs e)
{

    Image Img = e.Item.FindControl("ModelLogo") as Image;
    using (SqlConnection con = Connection.GetConnection())
    {
        string Sql = "Select Logo From Model";
        SqlCommand com = new SqlCommand(Sql, con);
        com.CommandType = CommandType.Text;
        SqlDataReader dr = com.ExecuteReader();
        if (dr.Read())
        {
            string Img2 = dr["Logo"].ToString();
            if (Img2 == System.DBNull.Value.ToString())
            {
                Img.Visible = false;
            }
        }


    }



}
</code></pre>
