I have a databound DropDownList and I need a code that will only show the DropDownList if there is a value in the Database, if the there is no value/empty DropDownlist it should not be visible.
I tried:
if (ddlFruits.Items.Count == 1)
{
ddlFruits.Visible = false;
}
else
{
ddlFruits.Visible = true;
}