今天用ajax做了下二级联动的菜单,照着别人做的,就是没法更新第二级中的数据,代码如下:
<asp:DropDownList id="industry" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2" DataTextField="Industry" DataValueField="IndustryId" OnSelectedIndexChanged="industry_SelectedIndexChanged">
</asp:DropDownList>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:DropDownList ID="industryTwo" runat="server"
DataTextField="IndustryTwo" DataValueField="IndustryTowId">
</asp:DropDownList>
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="industry" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
</triggers>
</asp:UpdatePanel>
industryTwo中的列表没法更新,实在是不知道错在哪,
<asp:DropDownList id="industry" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2" DataTextField="Industry" DataValueField="IndustryId" OnSelectedIndexChanged="industry_SelectedIndexChanged">
</asp:DropDownList>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:DropDownList ID="industryTwo" runat="server"
DataTextField="IndustryTwo" DataValueField="IndustryTowId">
</asp:DropDownList>
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="industry" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
</triggers>
</asp:UpdatePanel>
industryTwo中的列表没法更新,实在是不知道错在哪,
原来在独处的时候,才知道有种心情叫做寂寞,会在心口慢慢划过,在心里蔓延开的不是血液,而是思念!