I have a jQuery post method with JSON data included.
In my httphandler, in the processRequest method, Request ["Operation"] is null and none of my data has been sent. I work in a SharePoint 2010 environment.
public void ProcessRequest(HttpContext context) { try { string operation = context.Request["Operation"];
My JavaScript looks like this:
function CallService(serviceData, callBack) { $.ajax({ type: "POST", url: ServiceUrl, data: { Operation : "activate"}, contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { callBack(result); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.responseText); } });
In the debugger in VS, I cannot find the published values โโwhen I evaluate the HttpContext. In Firebug, the value is published as valid JSON data. Any reason why I cannot get the parameters?
Any help was appreciated.
Ralph source share