我有六个DropDownLists成对排列名称和密钥。它们的运作方式是您选择渠道合作伙伴,然后筛选并重新绑定总部等等。
到目前为止它工作正常,但我希望能够拥有它,以便每对DropDownLists由上面的那些触发。我该怎么做?
我已经考虑并尝试使用UpdatePanel包装最后两对,以便只触发那些。但是运气不好。任何帮助将不胜感激:)
到目前为止的代码是:
<table>
<tr id="trCP" runat="server">
<td>Channel Partners</td>
<td><asp:DropDownList ID="ddlChannelPartners" runat="server" AutoPostBack="True" CssClass="name" OnSelectedIndexChanged="ddlChannelPartners_SelectedIndexChanged" /></td>
<td><asp:DropDownList ID="ddlChannelPartnersKey" runat="server" AutoPostBack="True" CssClass="code" OnSelectedIndexChanged="ddlChannelPartnersKey_SelectedIndexChanged" /></td>
</tr>
<tr>
<td>Head Companys</td>
<td><asp:DropDownList ID="ddlHeadCompanies" runat="server" AutoPostBack="True" CssClass="name" OnSelectedIndexChanged="ddlHeadCompanies_SelectedIndexChanged" /></td>
<td><asp:DropDownList ID="ddlHeadCompaniesKey" runat="server" AutoPostBack="True" CssClass="code" OnSelectedIndexChanged="ddlHeadCompaniesKey_SelectedIndexChanged" /></td>
</tr>
<tr>
<td>Clients</td>
<td><asp:DropDownList ID="ddlClients" runat="server" AutoPostBack="True" CssClass="name" OnSelectedIndexChanged="ddlClients_SelectedIndexChanged" /></td>
<td><asp:DropDownList ID="ddlClientsKey" runat="server" AutoPostBack="True" CssClass="code" OnSelectedIndexChanged="ddlClientsKey_SelectedIndexChanged" /></td>
</tr>
<tr>
<td colspan="3">
<asp:Button ID="btnOK" runat="server" UseSubmitBehavior="true" Text="OK" OnClick="btnOK_Click" />
</td>
</tr>
</table>
答案 0 :(得分:1)
答案 1 :(得分:0)
您是否在AjaxControlToolkit中看到了CascadingDropDown?我认为这会做很多你想要的事情。