canuckconsulting
asked on
Filter listbox contents client-side
I have a .Net web application created with c# using Visual Studio 2010.
On a web page a have a DropDownList containing containing a list of publishers. Below that I have ListBox displaying books for the selected publisher. I would like the list to update when the users selects a publisher in the DropDownList. I can do this server-side but how can I do it client-side for quicker performance?
On a web page a have a DropDownList containing containing a list of publishers. Below that I have ListBox displaying books for the selected publisher. I would like the list to update when the users selects a publisher in the DropDownList. I can do this server-side but how can I do it client-side for quicker performance?
ASKER
It is something I am developing. Just an asp:DropDownList followed by an asp:ListBox. If it helps it will look like:
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1">Publisher 1</asp:ListItem>
<asp:ListItem Value="2">Publisher 2</asp:ListItem>
</asp:DropDownList>
</p>
<p>
<asp:ListBox ID="ListBox1" runat="server">
<asp:ListItem Value="1,1">Book1</asp:ListItem>
<asp:ListItem Value="1,2">Book 2</asp:ListItem>
</asp:ListBox>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the help which worked fine.
In the end I used jquery and something similar to this do to the next requirement I had:
http://jquerybyexample.blogspot.com/2012/05/how-to-move-items-between-listbox-using.html
In the end I used jquery and something similar to this do to the next requirement I had:
http://jquerybyexample.blogspot.com/2012/05/how-to-move-items-between-listbox-using.html
Cd&