Hi there,
Trying to figure out how to convert how to covert 5 variables i have in javascript (strings) to a json for sending along to my ajax function
here is my ajax funtion, sill relatively new to this but i believe this should work .. but i need to convert all my strings to a json - don't i?
I believe there are alternative ways of sending data without json, but this is the recommended way isn't it?
$.ajax({
type: "POST",
url: "MyService.aspx/SendEmail",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
alert(msg.d);
},
error: function() {
alert('error');
}
});
I believe that at the service end i need to extract the json - i am using asp.net
Any ideas?
thanks