asp.net ajax 相關錯誤的處理

來源:互聯網
上載者:User
    最近項目中有一個快顯視窗的功能需要實現,查看了一下asp.net ajax感覺在功能上實現起來還是比較簡單的,所以就用了asp.net ajax ajaxcontroltoolkit實現.
   在實現過程中出現了三個錯誤,有些鬱悶,但根據尋找原因,終於找到問題所在.
     1.ajaxcontroltoolkit中的組件不能添加到頁面中,這是我項目的原因所至,會提示"記憶體錯誤".
         處理方法:將ajaxcontroltoolkit.dll檔案先引用到項目中,不是添加到工具箱中,組件就可添加到頁面中.
     2.ajaxcontroltoolkit未定義的錯誤.
        處理方法:尋找原因是因為Server.Transfer()轉接頁面所至.因為下一頁面中修改,修改會再導接到添加的頁面,所以出現了ajaxcontroltoolkit未定義的錯誤.用Response.Redirect()解決.
    3. Sys.未定義的錯誤
        處理方法:asp.net中的web.config未配置    <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </httpModules>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.