代码如下:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlProvince" runat="server" AutoPostBack="True"
onselectedindexchanged="ddlProvince_SelectedIndexChanged">
</asp:DropDownList>
<asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True"
onselectedindexchanged="ddlCity_SelectedIndexChanged">
</asp:DropDownList>
<asp:DropDownList ID="ddlCounty" runat="server">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlProvince"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="ddlCity"
EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
但是第一次点下拉框时,不会局部刷新,以后就可以,不知道什么原因,请高手指点