AsyncPostBackTrigger不是已知元素?

时间:2011-05-02 00:43:37

标签: c# asp.net html ajax visual-studio

我正在使用asp.net和c#,制作一个带有ajax updatepanels的页面。当我尝试插入触发器元素时,我收到错误消息 AsyncPostBackTrigger不是已知元素。我错过了什么?

<asp:UpdatePanel ID="UdpEPL" runat="server" UpdateMode="Conditional" 
    Visible="False">
    <ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="BtnEplShowSubmit"
                EventName="BtnEplShowSubmit_Click"/>
        </Triggers>
    </ContentTemplate>
</asp:UpdatePanel>

1 个答案:

答案 0 :(得分:9)

Triggers

中删除ContentTemplate部分
<asp:UpdatePanel ...>
    <Triggers>
       <asp:AsyncPostBackTrigger .../>
    </Triggers>
    <ContentTemplate>

    </ContentTemplate>
</asp:UpdatePanel>