我想过滤 Repeater 控件中的组合框。
我有这个下拉列表:
<asp:DropDownList ID="ddAcademicDegree" runat="server" Width="256px"
SelectedValue ='<%# Bind("EdLevel") %>' CssClass="GeneralFont" DataTextField="Description" DataValueField="IDNo" AutoPostBack="True" DataSourceID="SqlDataSource2">
</asp:DropDownList>
然后我想根据您在第一个下拉列表中选择的内容过滤下一个下拉列表
<asp:DropDownList ID="ddDegree" runat="server" Width="256px" SelectedValue ='<%# Bind("DegreeID") %>' CssClass="GeneralFont" DataTextField="Description" DataValueField="IDNo" DataSourceID="SqlDataSource3"> </asp:DropDownList>
我有这个查询如何使用第一个下拉列表过滤第二个下拉列表?
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:HRIS_ConnectionString %>"
SelectCommand="select 0 as IDNo,'' as Description union all select code as IDNo,Description from degree order by idno"
ProviderName="<%$ ConnectionStrings:HRIS_ConnectionString.ProviderName %>"> </asp:SqlDataSource>
这是整个代码
<asp:Repeater ID="rptrEduc" runat="server"
OnItemCreated="rptrEduc_ItemCreated" EnableViewState="False"
onitemdatabound="rptrEduc_ItemDataBound" onitemcommand="rptrEduc_ItemCommand"
>
<ItemTemplate>
<table width ="100%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="20px"><asp:ImageButton ID="imgEdDelete" runat="server" onclick="imgEdDelete_Click" ImageUrl="~/IMAGES/delete_16x16.gif" OnClientClick='return confirm("Delete this record?");' /></td>
<td style="text-align: left">
Education:</td>
<td>
<asp:DropDownList ID="ddAcademicDegree" runat="server" Width="256px"
SelectedValue ='<%# Bind("EdLevel") %>' CssClass="GeneralFont" DataTextField="Description" DataValueField="IDNo" AutoPostBack="True" PropertyName="SelectedValue" DataSourceID="SqlDataSource2">
</asp:DropDownList>
</td>
<td>
Area of Study (Major)</td>
<td>
<asp:TextBox ID="txtMajor" runat="server"
Width="260px" CssClass="GeneralFontText"
Text='<%# Bind("Major") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td style="text-align: left">
</td>
<td>
<%-- SelectedValue ='<%# Bind("DegreeID") %>' CssClass="GeneralFont" DataTextField="Description" DataValueField="IDNo" >--%> ' CssClass="GeneralFont" DataTextField="Description" DataValueField="IDNo" DataSourceID="SqlDataSource3"> <%-- SelectedValue ='<%# Bind("Degree") %>' CssClass="GeneralFont">
硕士学士 --%> 重点领域(次要)'>
机构名称:'>
毕业年份:'CssClass="GeneralFontText">