Handling empty databound dropdown list in ASP.Net
<p>I have an asp.net page that has the following form fields:</p>

<ol>
<li>Dropdown 1. This drop down receives the data via SQL data source.</li>
<li>Dropdown 2. Based on the selection of the drop down 1, this drop down queries to the database using SQL datasource and is populated.</li>
<li>A panel control that is placed below drop down list 2 and it has a set of the controls.</li>
</ol>

<p>My problem is there may be a situation when nothing is returned from the datasource of drop down 2, I want to show an Item "No Data found" in the dropdown list 2 and simultaneously hide the panel that is placed below dropdown 2.</p>

<p>Can someone please let me know how this situation can be handled.</p>

<p>Appreciate the help.</p>

<p>Thanks,
Yagya</p>
