zoukankan      html  css  js  c++  java
  • 无刷新二级联动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> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (可选项:如果您不在此小区可选“其它”)</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>

  • 相关阅读:
    关于获取多个id的用法
    纯css打造凹进与突出效果
    ie8兼容半透明效果css
    常用函数积累
    ie兼容图片缩小后模糊失真(锯齿)问题
    图片放大_css3
    弹出层跳出原框架
    ifame_自适应高度
    POJ #2479
    SPOJ #752. Power it!
  • 原文地址:https://www.cnblogs.com/skyboy110/p/7272534.html
Copyright © 2011-2022 走看看