如何从jQuery传递int值到ASP.NET页面方法?

ACP*_*ACP 6 asp.net jquery pagemethods

我正在使用jQuery的ASP.NET页面方法.这是我的代码,

$.ajax({
      type: "POST",
      url: "Default.aspx/GetRecords",
      data: "{}",
      contentType: "application/json; charset=utf-8",
      dataType: "json",
Run Code Online (Sandbox Code Playgroud)

和ASP.NET页面方法是,

[WebMethod]
public static string GetRecords(int currentPage,int pagesize)
{
    // my logic here
}
Run Code Online (Sandbox Code Playgroud)

如何通过值currentPagepagesize从jQuery的?

ACP*_*ACP 7

我搞定了.我的数据部分必须是

data: "{'currentPage':1,'pagesize':5}",
Run Code Online (Sandbox Code Playgroud)