tags:

views:

34

answers:

2

Hello. This is my first time here.

I have almost no experience in ASP bu tI need to develop a small site linked to an access database in order to load data.

So, in my site I've got two combobox or if you prefer List/Menu controls.

It's working ok, I mean, if I choose an option in each combox it filter.

What I need to to have an option in each combobox to not filter, such like an option saying ALL, so if I choose the option ALL in one combobox it would show all records.

I hope I was clear.

Please help.

Thanks. Marco

A: 

If you are using ASP 3.0, you simply add a new item:

<select name="mycombo">
<option value="0">All</option>
...
</select>

Check for the item 0 and dont act on it.

If you are usng .NET
<asp:DropDownList id="mycombo" runat="server">
<asp:ListItem value="0" Text="All" />
...
</asp:DropDownlist>
Bhaskar
A: 

When you choose All then remove the filter criteria and show all records.

First of all add the option All to your combo box at a specified index. When the combo values is changed check for that index and if it is the index of 'All' then remove the filter criteria applied and show full records.

rahul