My Pagemethod implementation is not working in Chrome browser.
I have ASP.NET 3.5 web application developed in VS 2008.
The code below not working in chrome or Safari:
function FetchDataOnTabChange(ucName)
{
PageMethods.FetchData(ucName, OnSuccessFetchDataOnTabChange, OnErrorFetchDataOnTabChange);
}
function OnErrorFetchDataOnTabChange(error)
{
//Do something
}
function OnSuccessFetchDataOnTabChange(result)
{
//Do something
}
This should work in all browsers by following the steps below:
System.Web.Services.WebMethod
attribute. [WebMethod]
[WebMethod] public …
[WebMethod] public static …
the page (either inline or in the
code-behind). It cannot be defined
in a control, master page, or base
page.
have EnablePageMethods set to true.
This is from a working application
aspx page:
code behind: