我已经发布了如何使用jquery ajax将参数发送到webmethod我的脚本代码如下所示我还没工作PLS建议我......
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
url: "View.aspx/Getgraph12",
data: '{name12: "' + machineidnew + '" }',
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (data) {
chartdatamain = data.d;
drawchart();
},
error: function (xhr, status, error) {
}
})
View.aspx / Getgraph12
[System.Web.Services.WebMethod]
public static List<ChartDetails> Getgraph12(string name12)
{
}