首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

ScriptManager、UpdatePanel,该如何解决

2013-03-12 
ScriptManager、UpdatePanelasp:ScriptManager IDScriptManager1 runatserver/asp:ScriptManager

ScriptManager、UpdatePanel


<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <ContentTemplate>
        <asp:DropDownList ID="DropDownList1" runat="server" 
            onselectedindexchanged="DropDownList1_SelectedIndexChanged">
            <asp:ListItem>1</asp:ListItem>
        </asp:DropDownList>
       </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="DropDownList1_SelectedIndexChanged" /> 
            </Triggers>
   </asp:UpdatePanel>

局部刷新,不知道哪里出错

对于 UpdatePanel“UpdatePanel1”中的触发器,未能在关联的控件“DropDownList1”上找到名为“DropDownList1_SelectedIndexChanged”的事件。
[解决办法]
后台没定义DropDownList1_SelectedIndexChanged事件

看.cs文件里有这个吗?
public void DropDownList1_SelectedIndexChanged(object sender, EventsArg e)
{
   ...
}
[解决办法]
DropDownList1_SelectedIndexChanged
后台没有这个方法吧

热点排行
Bad Request.