读书人

DropDownList的级联解决办法

发布时间: 2012-08-31 12:55:03 作者: rapoo

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> 

读书人网 >C#

热点推荐