我有以下jQuery代码来在aspx页面中调用webmethod
$.ajax({
    type: "POST",
    url: "popup.aspx/GetJewellerAssets",
    contentType: "application/json; charset=utf-8",
    data: '{"jewellerId":' + filter + '}',
    dataType: "json",
    success: AjaxSucceeded,
    error: AjaxFailed
});
这是网络方法签名
[WebMethod]
public static string GetJewellerAssets(int jewellerId)
{
这很好。
但是现在我需要将两个参数传递给web方法
新的网络方法如下所示
[WebMethod]
public static string GetJewellerAssets(int jewellerId, string locale)
{
}
如何更改客户端代码以成功调用此新方法签名?
编辑:
以下2种语法有效
data: '{ "jewellerId":' + filter + ', "locale":"en" }',和
data: JSON.stringify({ jewellerId: filter, locale: locale }),其中filter和locale是局部变量
                  如果您是像我这样的悲伤灵魂,您可能已经在这个问题上停留了几个小时。
                
                  
                    —
                    Kaleb Anderson 
                    
                  
                
              JSON.stringify与对象文字一起使用时,必须在参数名称中包含一个冒号,并将其全部{}括在大括号内。使用JSON.stringify(objectLiteral)不起作用。
                
                  方法签名像     
                
                  
                    —
                    Kiquenet 
                    
                  
                
              [WebMethod]         [ScriptMethod(UseHttpGet = true)]          public static string TestIBAN(string ccc)?
                
data: JSON.stringify({ jewellerId: filter, locale: locale })是我每个人发现的最好方法,谢谢@ChrisCa