I have 5 link buttons. And I want to send their command argument to a web method to load on page scroll.
$.ajax({
type: "POST",
url: "Default.aspx/GetCustomers",
data: '{pageIndex:'+pageIndex+'}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert('Hell 1');
},
error: function (response) {
alert('Hell 2');
}
});
No you can't use CommandArgument in jQuery because it stores in viewstate of the page. but you can use
data-...
attribute instead.