$("#btnSend").click(function(){
$.ajax({
url : "/ControllerName/MethodName",
type : "POST",
dataType : "json",
contentType : "application/html",
data : '{ divhtml:"<p>World</p>" }'
});
});
Passes null to the action method. Tried to change the content type to json. Started giving errors. What's the proper way?
JSON.stringify({key: value})