Hello All.......
I am new in Asp.Net Web development..........
I want to do ajax post call , in which I want to pass 18 parameters in c# method, can we use json object as a parameter to c# method or what should be the approach to pass these much parameters into c# method?
Can anybody help me out for solving this issue?
Thanks in advance.
- Regards
Passing too many parameters in c# mehod using ajax post call
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Yadlapalli SrikanthRank #7,940 · 231 reputationPosted Oct 4, 2015, 10:22 PM EDT
$(document).ready(function () {
var Student = {};
Student.Name = "Srikanth";
Student.group = "IT";
var DTO = {'Student' : Student};
ObjectPost(DTO);
})
function ObjectPost(DTO) {
$.ajax({
type: "POST",
url: "CustomerForm.aspx/getobjects",
data: JSON.stringify(DTO),
contentType: "application/json; charset=utf-8",
success: function (result) {
alert(result.d);
},
error: function (err) {
alert(err.status + " - " + err.statusText);
}
});
}
Francis SusaimichaelRank #466 · 5.4K reputationPosted Oct 4, 2015, 9:50 PM EDT