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
Loading
Yadlapalli SrikanthPosted Oct 5, 2015, 2:22 AM
$(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 SusaimichaelPosted Oct 5, 2015, 1:50 AM