Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何过滤asp中继器内的下拉列表?_Asp.net_Repeater - Fatal编程技术网

Asp.net 如何过滤asp中继器内的下拉列表?

Asp.net 如何过滤asp中继器内的下拉列表?,asp.net,repeater,Asp.net,Repeater,我想过滤中继器控件中的组合框 我有一个下拉列表: <asp:DropDownList ID="ddAcademicDegree" runat="server" Width="256px" SelectedValue ='<%# Bind("EdLevel") %>' CssClass="GeneralFont" DataTextField="Description" DataValueField="IDNo" Aut

我想过滤中继器控件中的组合框

我有一个下拉列表:

<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>

教育:
学习领域(专业)
--%> 'CssClass=“GeneralFont”DataTextField=“Description”DataValueField=“IDNo”DataSourceID=“SqlDataSource3”>
大师 单身汉 --%> 集中区(小) '> 机构名称: '> 毕业年份: 'CssClass=“generalfontext”>


那么
asp:repeater
在哪里?很抱歉,这里没有完全解决您的问题-但是为什么不调用AJAX以根据第一个下拉选择获取第二个下拉框的选项呢?它速度快,无需回邮,高效简单。