日期:2014-05-18  浏览次数:20789 次

DropDownList的级联
先绑定一个DropDownList 然后在第一个被选中时接着出来第二个的值

------解决方案--------------------
HTML code
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    省份:<asp:DropDownList ID="ddlProvinceList" runat="server" AutoPostBack="true" 
                        onselectedindexchanged="ddlProvinceList_SelectedIndexChanged">
                    </asp:DropDownList>
                </div>
                <div>
                    城市:<asp:DropDownList ID="ddlCityList" runat="server">
                    </asp:DropDownList>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>