Sending data to webservice without using querystring in jQuery -


i have following jquery using send data webservice.

var value1="this val1"; var value2="this val2";  $.ajax({                 url: "test.asmx/postdata",                 data: { data1: value1, data2: value2 },                 success: function (html) { strreturn = html; },                 async: false             }); if (strreturn == "") { //some error occured or data did not send webservice } else { //the data send webservice } 

now problem since data posted query string. if length of data in value1 & value2 long, data not send webservice.

how can avoid sending data using querystring. i've tried setting ajax parameters "processdata" false , "type" post still no luck.

it great if send me jquery code on how can done.

thanks in advance

what mean dat ais not sent?if do:

$.ajax({                 type: "post",                 url: "test.asmx/postdata",                 data: { data1: value1, data2: value2 },                 success: function (html) { strreturn = html; },                 async: false             }); 

the webservice receives no data @ all?or strreturn == ""?in second case did declare strreturn can seen?

var strreturn; $.ajax({                 url: "test.asmx/postdata",                 data: { data1: value1, data2: value2 },                 success: function (html) { strreturn = html; },                 async: false             }); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -