Select All Dropdown Lists

Nov 30 2009 10:03 AM

Hi,
I'm fairly new to C# and SQL.  I'm trying to build a search tool for a system that I am helping to build.  What I am wanting to do is simply add 'select all' to a database bound drop down list so that when users choose select all from the list and clicks search it will search all of the items in the dropdown list
My pretty basic code so far is:
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="fileName" DataValueField="fileName" AppendDataBoundItems="True">
<asp:ListItem Value="-1"> Select All</ListItem>
</asp:DropDownList>
Now how do I get it recognise that when the user clicks on Select All that it should search all of the items in the dropdown list?  Any help would be greatly appreciated :)
Thanks
Kristin
 

Answers (4)