Wednesday, October 22, 2008

Page Methods is undefined

        You may receive "Page Methods is undefined while calling Server Side function from Client Side Code using PageMethods in AJAX. The possible cause can be,

1. You may have not added EnablePageMethods="true" in ScriptManager tag.

   1: <ajax:ScriptManager 
   2:     EnablePageMethods="true" ID="ScriptManager1" runat="server">
   3: </ajax:ScriptManager>

2. You have a pre-release version of Atlas or the Ajax beta installed. Download latest version from here.


3. Your application’s virtual directory is configured for .NET Framework 1.1


4. Your application does not have the Ajax DLL in its Bin folder. The DLL is "System.Web.Extensions.dll". You may find the DLL at "C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025". You may have this DLL at different location.


5. Your Web.config does not include a WebServices section. To verify this create a new website and select Ajax Enable Website. You can see that all necessary tags are included in web.config file of this website. You cab replace new web.config file with your application. 


Happy Programming !!!

1 comment:

Chinmay said...

Raja... he he he.. nice article.. he he he...