drop down default selection causing search to begin
<p>We have a search page with several textboxes that user can enter data in to search by.  There are date textboxes where a date range can be entered.  There is a drop down where you select which date field you want to filter on.</p>

<p>the date range textboxes are not enabled by default.  Only if you select a date field in the drop down can you enter a date.  The default drop down selection is ""  a blank.</p>

<p>if you select a date field and then change to another date field in the drop down everything is ok.  If you select a datefield in the drop down and then switch back to the default "" blank, it triggers the search.  I do not want this to happen.  I only want the search to happen when they click the search button.</p>

<pre><code>  protected void ddlDateType_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlDateType.SelectedValue != "")
        {
            txtSearchEndDate.Enabled = true;
            txtSearchStartDate.Enabled = true;
        }

        else
        {
            txtSearchEndDate.Text = "";
            txtSearchStartDate.Text = "";
            txtSearchEndDate.Enabled = false;
            txtSearchStartDate.Enabled = false;
        }
    }
</code></pre>

<p>Can someone tell me how to stop the search from running when someone switches back to the default "" selection in the drop down?</p>

<hr>

<p>I commented out the if else code and still get the same result.   Selecting anything but the the default no search is started, selecting default "" a search is triggered.</p>
