Atlas supported page methods: A functionality to embed web service methods into .aspx pages and consume them with JavaScript. For instance, if you had the following method:
[WebMethod]
string sayHello() {
return "Hello";
}
—you could consume this method from JavaScript using the
PageMethods.sayHello() call.
With ASP.NET AJAX, this has changed a bit. You have to change
WebMethod to
ScriptMethod, but you also have to edit the
ScriptManager control to explicitly support page method calls:
<asp:ScriptManager id="asm" runat="server" EnablePageMethods="true" />
Otherwise, ASP.NET AJAX no longer creates the necessary JavaScript proxy for the web service calls.
Also, you have to change the method a bit:
- It additionally needs the
ScriptMethod attribute - It must be declared as
static
Here is one possible way:
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string sayHello() {
return "Hello";
}
(Part of the
Atlas to ASP.NET AJAX Migration series.)
This blog entry serves as a kind of TOC for a series of entries I will be doing during the next days and weeks. I am currently porting several apps (and yes, book samples) from Atlas to ASP.NET AJAX, and from time to time I have a kind of "gotcha!" experi
Tracked: Feb 05, 11:09
This page contains some info about john pitman
Tracked: Feb 24, 02:52
Good information source for bondage cum sluts.
Tracked: Apr 24, 09:03
home | naked black lesbian | contacts
Tracked: Apr 26, 16:01