更新了ASP.NET 3.5到4.0 - > Sys.WebForms.PageRequestManager未定义

Leo*_*ard 5 .net asp.net updatepanel asp.net-ajax

正如标题所示,我最近将包含UpdatePanels和类似AJAX技术的ASP.NET 3.5应用程序更新到ASP.NET 4.0.不幸的是,UpdatePanels不再工作,整页回发使它全部向南.

的Web.config文件

 <?xml version="1.0"?>
 <configuration>
    <configSections>
        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"/>
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging"/>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/>
    </configSections>
    <system.net>
        <mailSettings>
            <smtp>
                <network host="localhost"/>
            </smtp>
        </mailSettings>
    </system.net>
    <system.web>
        <!--
             The <authentication> section enables configuration 
             of the security authentication mode used by 
             ASP.NET to identify an incoming user. 
         -->
        <authentication mode="Forms">
            <forms loginUrl="~/Login.aspx" name=".ASPXFORMSAUTH" defaultUrl="~/Administration/SystemEvents.aspx"/>
        </authentication>
        <!--
             The <customErrors> section enables configuration 
             of what to do if/when an unhandled error occurs 
             during the execution of a request. Specifically, 
             it enables developers to configure html error pages 
             to be displayed in place of a error stack trace. -->
        <customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx">
            <error statusCode="401" redirect="~/Unauthorized.aspx"/>
        </customErrors>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>
 </configuration>
Run Code Online (Sandbox Code Playgroud)

在Chrome中执行时出现Javascript错误:

Uncaught TypeError: Object function Function() { [native code] } has no method '_registerScript'
Uncaught TypeError: Cannot read property 'PageRequestManager' of undefined
Run Code Online (Sandbox Code Playgroud)

有什么我可以做错的?谢谢!

ErT*_*rTR 5

EnablePartialRendering="false"在脚本管理器中设置

  • 尝试了所有其他解决方案,但这对我有用..谢谢:) (2认同)

Leo*_*ard 1

...我自己通过替换 UpdatePanels 和删除脚本管理器解决了这个问题。