How do I get the value of a select in code-behind?
<p>I am using ASP.NET and in my <code>.aspx</code> page I have the following code, and, based on the selection, I am displaying the appropriate <code>div</code>s.  It's working great, as is, but the question is: <em>How do I get the value (whatever selected by user) on code-behind?</em></p>

<pre><code>&lt;select id="filterResultsBy"  &gt;
    &lt;option value=""&gt;Select...&lt;/option&gt;
    &lt;option value="Date"&gt;Date&lt;/option&gt;
    &lt;option value="Subject"&gt;Subject&lt;/option&gt; 
    &lt;option value="Status"&gt;Status&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>If I add <code>runat="server"</code> or use the server <code>asp:DropDownList</code> control, jQuery does not work. </p>

<pre><code>$('#ddlFilter').change(function(){ 
   var sel = $(this).val(); 
   if(sel === 'DATE'){ 
     hideAll();// a function to hide all the divs first 
     $('#divDateRangeSearch').show(); 
   } else if(sel === 'SUBJECT'){ 
     ///so on... 
   } 
}); 
</code></pre>
