[ASP.NET] Ajax下執行程式出現'Sys'未被定義

摘要:[ASP.NET] Ajax下執行程式出現'Sys'未被定義

在新開專案時,不知為啥出現這個問題,跑去Google了一下找到以下解答

1.先確定「參考」到的AJAX組件版本
2.在web.confing加入以下tag

<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="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>

參考資料:
http://social.msdn.microsoft.com/forums/zh-TW/236/thread/459538c8-cdce-46f2-9d60-0ed0ae1c7833/