DropDownList控件的changed事件调用

DropDownList控件的SelectedIndexChanged和TextChanged事件调用必须首先把该控件的AutoPostBack属性设置为true,否则该事件在应用时无法自动触发!

    <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True">
    </asp:DropDownList>

    <asp:DropDownList ID="DropDownList1" runat="server"
            onselectedindexchanged="DropDownList1_SelectedIndexChanged"
            ontextchanged="DropDownList1_TextChanged"
            AutoPostBack="True">
    </asp:DropDownList>

posted @ 2008-10-07 17:09  笑一笑  阅读(680)  评论(0编辑  收藏  举报