Hi
I am developing a user control with dropdown controls in asp.net. The requirement is that I display the data from the database into the dropdown such that when selected a value, it should display corresponding records (to that particular value) into the gridview. Also, there is an ‘ALL’ option in the dropdown which will get all the records regardless of the match.
the dropdown controls are with default as ‘Select One’ (added using the edit item functionality of the dropdown using the value =””
property),
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="">--select one--</asp:ListItem>
</asp:DropDownList>
and “ALL” option is add to them from the code behind with index 0.
Eg: DropDownList1.Items.Insert(0, "All");
So I need to write a javascript function for reset which, when clicked displays the ‘select One’ option in the dropdown instead of “ALL” (which is what happening now). Any help is really appreciated.