I need to send a big block of HTML in a Json object like this:
JsonResult jsn = Json(new Dictionary<string, object> { { "success", true },
{ "lastPID", posts[0].ID },
{ "content", "" } });
return jsn;
For some reason I get this error when I put that html block into the content variable: Server cannot set content type after HTTP headers have been sent.
This doesn't happen if I return some random non-html content.
Is there any encoding that I need to do before I can send my big block of html?
What about the client end? How do I get back the data.