I've been wondering on what is really the best way on sending so many parameters via Ajax jQuery.
I know how to send little number of post parameters via ajax, it would be like this :
$.ajax({
type: "POST",
url: 'controller/function',
data: {
param1 : param1,
param2 : param2
},
success: function (result) {
}
});
And I've been wondering what if i will send 50 or up parameters. Let's say,
$.ajax({
type: "POST",
url: 'controller/function',
data: {param1 : param1, param2 : param2, ......., param50 : param50},
success: function (result) {
}
});
Now if you'll ask why i need this, its because it is a requirement where i post different independent parameters . Leaving the requirement, i just want to know if this is ok or are there are any bad effects on this in terms of server side or client side?
Question no 2, what is the best approach you can recommend on sending many parameters in an Ajax call. Lets say i have 50 "DIFFERENT" long strings that i should post.
Any suggestions?
UPDATE :
Im not using form by the way. I am sending different long HTML strings and i send them not via form. I just grab them via jquery like
var param1 = $(".divwrapper1").html();
var param2 = $(".divwrapper2").html();
..... and so on and so for
and use these variable and send it via ajax