How to Check if ListBox is Empty on Client-Side
<p>I created a <code>javascript confirm</code> as below.</p>

<pre><code>&lt;script Type="Text/Javascript"&gt;

function CheckListBox(lvi)
{
    if(lvi == "")
    {
        if(confirm("Are you sure?"))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}

&lt;/script&gt;
</code></pre>

<p>I need to test if the <code>ListBox.Items</code> control is empty...  I already made reference on my aspx page</p>

<pre><code>&lt;script language="javascript" type="text/javascript" src="/JS/confirm.js"&gt;&lt;/script&gt;
</code></pre>

<p>I want to know how to call it on my <code>aspx.cs</code> page . . . So I can pass the <code>parameter</code>:</p>

<pre><code>string oi = Listbox_Clubes.Items.Count.ToString();//Its the parameter I want to pass
</code></pre>
