javascript - Ajax 更新面板随机错误 'PRM_MissingPanel'

标签 javascript c# asp.net ajax updatepanel

我使用 Visual Studio 中的 Ajax 更新面板来处理网站上搜索功能的回发。 (IE 搜索成员)将生成带有结果的 GridView 。每次我从 TFS 获取最新版本时,它都会抛出此错误:

unhandled exception at line 1, column 132567 in http://localhost:58921/bundles/MsAjaxJs? JavaScript runtime error: Unable to get the property 'PRM_MissingPanel' of undefined or null reference

在它坏了之后,我可以再次调试它不会坏,直到我得到一个更新的版本。

我进行了大量的谷歌搜索,但找不到 PRM_MissingPanel 是什么。

关于为什么会发生这种情况有什么想法吗?

MsAjaxBundle 来自 ScriptManager,它是在我创建我的 Web App 时生成的:

    <asp:ScriptManager runat="server">
        <Scripts>
            <asp:ScriptReference Name="MsAjaxBundle" />
            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="bootstrap" />
            <asp:ScriptReference Name="respond" />
            <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
            <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
            <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
            <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
            <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
            <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
            <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
            <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
            <asp:ScriptReference Name="WebFormsBundle" />
        </Scripts>
    </asp:ScriptManager>

最佳答案

问题是我隐藏了一个包含更新面板的 div,然后将 visible 更改为 true,但实际上并没有显示更新面板。

以下是我对其进行的更改,以便更新面板始终存在,而不是消失和重新出现:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div visible="false" id="Search" runat="server">
            <div style="overflow: hidden;">

关于javascript - Ajax 更新面板随机错误 'PRM_MissingPanel',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29483877/

相关文章:

javascript - 有可选的延期吗?

c# - 锁定属性

javascript - Javascript 中的 YouTube 直播

javascript - 将 observables 数组传递给 zip

c# - WCF 有多少种契约类型?

C# ASP.NET Azure 移动服务 InvalidOperationException

c# - 将 asp.net 图表保存到文件

c# - Find Control on RowDataBound-Event 返回 NULL/Empty

javascript - 使用 jquery 和 .submit 捕获表单提交

c# - All 与 Any LINQ 查询的组合意味着什么