2012-01-04 13 views
5

Như tiêu đề cho biết, gần đây tôi đã cập nhật một ứng dụng ASP.NET 3.5 có chứa UpdatePanels và các công nghệ AJAX tương tự cho ASP.NET 4.0. Thật không may, UpdatePanels không làm việc nhiều hơn và toàn bộ trang postbacks làm cho nó tất cả đi về phía nam.Cập nhật ASP.NET 3.5 đến 4.0 -> Sys.WebForms.PageRequestManager là không xác định

Web.config file

<?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> 

Javascript lỗi khi thực hiện trong Chrome:

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

là gì đó mà tôi có thể đã làm sai? Cảm ơn bạn!

Trả lời

0

... và tôi đã tự giải quyết bằng cách thay thế UpdatePanels và bằng cách xóa trình quản lý tập lệnh.

4

Tôi đã gặp sự cố với điều này gần đây vì tôi đang cập nhật dự án cũ hơn và làm theo các bước ở trên nhưng vẫn cho tôi lỗi tương tự. Tôi thấy rằng tôi cần cập nhật một dòng trong tệp web.config đã sửa nó.

tôi đã thay đổi:

<xhtmlConformance mode="Legacy"/> 

tới:

<xhtmlConformance mode="Transitional"/> 
3

Set EnablePartialRendering="false" trong ScriptManager

+1

thử tất cả giải pháp khác, nhưng điều này làm việc cho tôi .. cảm ơn :) – Gaurravs

Các vấn đề liên quan