DISCLAIMER: I am very new to asp.net
I am working on a webform that allows users to access information from a database of algae species. I have a drop down list of all algae genera for the user to chose from. I would also like to have a check box that would allow the user to filter the drop down list so that it only shows diatom genera (diatoms are a type of algae).
Below is code that I thought should work, however checking the checkbox seems to have no effect :(
Any help would be greatly appreciated!
If chkDiatoms.Checked Then
dsGenusList.FilterExpression = "is_diatom = 1"
dsGenusList.FilterExpression = ""
<asp:CheckBox id="chkDiatoms" text="Diatoms Only" runat="server" AutoPostBack="True"/> <br>
<asp:DropDownList ID="ddlGenus" runat="server" dataSourceID="dsGenusList" dataTextField="genus"> </asp:DropDownList>
<asp:SqlDataSource ID="dsGenusList" runat=&q
View Complete Post