我想用ajax实现两个dropdownlist的联动,数据都是从数据库中取出。
我在母版页注册了控件,然后在母版页拖了一个scriptManager控件。然后内容页的代码如下
<tr id="role" style="display:none;" >
<td align="right" style="width: 100px">角色类型: </td>
<td colspan="2">
<asp:UpdatePanel ID="UpdatePanel1" runat ="server" >
<ContentTemplate>
<asp:DropDownList ID="ddlistRoleType" runat="Server" OnSelectedIndexChanged="ddlistRoleType_SelectedIndexChanged" AutoPostBack ="true"></asp:DropDownList>
角色名称: <asp:DropDownList ID="ddlistRoleName" runat="Server"></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID ="ddlistRoleType" EventName ="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>在代码页实现dropdownlsit的数据绑定以及SelectedIndexChanged事件。
可是运行却老是提示未知的服务器控件updatepanel。。不知道是什么问题??
我在母版页注册了控件,然后在母版页拖了一个scriptManager控件。然后内容页的代码如下
<tr id="role" style="display:none;" >
<td align="right" style="width: 100px">角色类型: </td>
<td colspan="2">
<asp:UpdatePanel ID="UpdatePanel1" runat ="server" >
<ContentTemplate>
<asp:DropDownList ID="ddlistRoleType" runat="Server" OnSelectedIndexChanged="ddlistRoleType_SelectedIndexChanged" AutoPostBack ="true"></asp:DropDownList>
角色名称: <asp:DropDownList ID="ddlistRoleName" runat="Server"></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID ="ddlistRoleType" EventName ="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>在代码页实现dropdownlsit的数据绑定以及SelectedIndexChanged事件。
可是运行却老是提示未知的服务器控件updatepanel。。不知道是什么问题??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货