Search code examples
jqueryashx

Passing more than one parameter from jQuery to ASHX


How can I pass more than one parameter from jQuery to an ASHX file. I want to send three values with POST, not GET.


Solution

  • $.ajax({
     'type' : 'POST',
     'url' : '/my_great_ashx_file.ashx',
     'data' : {
      'first_field' : 'foo',
      'second_field' : 'bar',
      'third_field' : 'buz'
     },
     'success' : function () {
      alert('This was a triumph.');
     }
    })