Is it possible to send large amount of data (grid content for example) in $.ajax
, to controller?
Are there workarounds of "URI too long" thing?
I know it's probably not the best practice, instead I should probably send each row one by one, but still is it possible?
Asked
Active
Viewed 1,662 times
1

iLemming
- 34,477
- 60
- 195
- 309
1 Answers
2
Are there workarounds of "URI too long" thing?
Use a POST HTTP verb instead of GET:
$.ajax({
url: '/foo',
type: 'POST',
data: { value: someVariableThatCouldBeHuge },
success: function(result) {
// TODO: process the results
}
});
or the equivalent:
$.post('/foo', { value: someVariableThatCouldBeHuge }, function(result) {
// TODO: process the results
});

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928