asp:DropDownList 级联但只想局部刷新
有2个asp:DropDownList 级联的
通过ddl_Dep_SelectedIndexChanged 去查ddl_Tran要绑定的内容
<asp:DropDownList ID="ddl_Dep" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_Dep_SelectedIndexChanged"></asp:DropDownList>
<asp:DropDownList ID="ddl_Tran" runat="server" ></asp:DropDownList>
有一个问题 因为设置了AutoPostBack="True"
所以整屏都刷新了一下
尝试 加了asp:ScriptManager
<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddl_Dep" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_Dep_SelectedIndexChanged"></asp:DropDownList>
<asp:DropDownList ID="ddl_Tran" runat="server" ></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="btn_Search" runat="server" Text="查询" CssClass="submit"
OnClick="btn_Search_Click" />
结果 选择了 ID="ddl_Dep"后, 还是整屏刷
我怎么才能
asp:DropDownList 还可以级联 但只局部刷新 ?