How to hide an empty databound DropDownList
<p>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.</p>

<p>I tried:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>   if (ddlFruits.Items.Count == 1)
     {
         ddlFruits.Visible = false;
     }
     else
     {
         ddlFruits.Visible = true;

     }</code></pre>
</div>
</div>
</p>