(Question resolved with the help of the two reply posts--see below)
I would appreciate help getting a simple example of exchanging data JSON data between a browser (
Other resource suggest removing the contentType: 'application/json; charset=utf-8',
from the AJAX call:
$.ajax({
url: "ericHandler.ashx",
data: myData,
dataType: 'json',
type: 'POST',
success: function (data) { alert("DIDit = " + data.eric); },
error: function (data, status, jqXHR) { alert("FAILED:" + status); }
});
Read the values on the server side:
string myPar = context.Request.Form["par"];
You can also try:
string json = new StreamReader(context.Request.InputStream).ReadToEnd();
which was mentioned here: https://stackoverflow.com/a/8714375/139917