Force asp.net dropdownlist to expand
<p>I have an ASP.NET data bound dropdownlist which is populated based on the contents of a textbox.  After it is populated I would like to expand the dropdownlist automatically, so that the user realizes that a choice needs to be made and doesn't need to click on the dropdown to expand it.  There doesn't seem to be a property or method do do this.</p>

<p>EDIT:  After trying out Ed B's example, I am still stuck.  The id of my ddl is 'ctl00_ContentPlaceHolder9_ddlContact'.  If I put the following in the onclick event of a button, it works fine, the dropdown expands nicely:</p>

<pre><code>    document.getElementById('ctl00_ContentPlaceHolder9_ddlContact').size=10;
</code></pre>

<p>However, the following code in the Databound event of the ddl shows the alert but doesn't expand the dropdown:</p>

<pre><code>string script = "&lt;SCRIPT LANGUAGE='JavaScript'&gt; ";
    script += "alert('expanding');document.getElementById('ctl00_ContentPlaceHolder9_ddlContact').size=10 &lt;/SCRIPT&gt;";
    ClientScript.RegisterClientScriptBlock(GetType(), "Dropdown", script);
</code></pre>
