无刷新二级联动dropdownlist
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:DropDownList ID="area" runat="server" Width="100px" DataSourceID="SqlDataSource1" DataTextField="proname" DataValueField="proid" AutoPostBack="true">
<asp:ListItem Selected="True" Value="1">选择区域</asp:ListItem>
<%--<asp:ListItem Value="2">11点-12点</asp:ListItem> --%>
</asp:DropDownList>
<asp:DropDownList ID="xiaoqu" runat="server" Width="100px" DataSourceID="SqlDataSource2" DataTextField="xiaoquname" DataValueField="lid" >
<asp:ListItem Selected="True" Value="1">请选择小区</asp:ListItem>
<%-- <asp:ListItem Value="2"></asp:ListItem> --%>
</asp:DropDownList> (可选项:如果您不在此小区可选“其它”)</td>
</ContentTemplate></asp:UpdatePanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:guangdaConnectionString %>"
SelectCommand="SELECT * FROM [area] order by proid desc">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:guangdaConnectionString %>"
SelectCommand="SELECT * FROM [xiaoqu] WHERE ([proid] = @Classid)">
<SelectParameters>
<asp:ControlParameter ControlID="area" Name="Classid" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>