Since it was surprisingly difficult to find sample code, I decided to kick off my first post with a little bit about PageMethod's in ASP.Net AJAX 1.0 RC. A PageMethod is basically just a method that is exposed and callable from client script. The method must be defined as a public static and can be located in the aspx page or in the code behind (in the beta it could not be in the code behind).
public partial class _Default : System.Web.UI.Page
   public static string ReverseString(string data)
      if (data == null || data.Length == 0)
         throw new ArgumentNullException("data", "data param can not be null or empty string");

      char[] reversed = new char[data.Length];
      for (int i = 0, j=data.Length- 1; i < data.Length; i++, j--)
         reversed[i] = data[j];

      return new string(reversed);

To then call the method via client script you would use the PageMethods object and using the method name as defined in the page class, like PageMethods.ReverseString("some string").

   <script type="text/javascript" language="javascript">
      function ReverseString()
         var control = $get("InputString");
         PageMethods.ReverseString(control.value, ReverseSucceeded, ReverseFailed, control);

      function ReverseSucceeded(results, ctl)
         ctl.value = results;

      function ReverseFailed(results, ctl)


   <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="server" />

      <asp:TextBox ID="InputString" runat="server" />
      <asp:Button ID="ReverseIt" runat="server" OnClientClick="ReverseString(); return false;" />

When calling the method, the first <n> parameters in the PageMethods call match the parameters to the class method. In this case its only one parameter, the string to be reversed. Optionally, the next parameter is the callback for success, followed by the callback for failure. Then is the context data, in this case I'm just sending the input control but it can be anything.

If you are curious about what happens next, here is some key info from Fiddler about the HTTP Request and Response.

The request looks like this minus some of the standard http stuff:

POST /AJAXCTPTest/Default.aspx/ReverseString HTTP/1.1
Referer: http://localhost:36993/AJAXCTPTest/Default.aspx
Content-Type: application/json; charset=utf-8
Host: localhost:36993
Content-Length: 37

{"data":"See the four horsemen ride"}

And the response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 28

"edir nemesroh ruof eht eeS"

As you can see, PageMethods are pretty light and extremely easy to implement. I hope this helps save the next person a few minutes of searching.