An object reference is required for the non-static field, method, or property 'System.Web.UI.Control.Visible.get'
في هاذا الكود
string str = "select Id,TitleAr, from Offer where ([IsActive] = @IsActive) ";
SqlCommand cmd = new SqlCommand(str, con);
if (cmd.Parameters.AddWithValue("@IsActive", 2) != null)
{
Image1.Visible = true;
}وشكرا.