title: How to return HTML from controller using ajax?
body: <p>My controller code:</p>
  
  <pre><code>    public async Task&lt;ActionResult&gt; GetHtml(int id)
      {
          var myModel = await db.Models.FindAsync(id);
  
          return Json(new { jsonData = myModel.MyHtml }, JsonRequestBehavior.AllowGet); 
      }
  </code></pre>
  
  <p>My View code:</p>
  
  <pre><code>$('#MyDropDownList').on('change', function() {
      var myModelId = $(this).val();
      var urlGetMyHtml = '@Url.Action("GetHtml", "MyHtmlController")';
      $.getJSON(
          urlGetMyHtml,
          { id: myModelId },
          function(jsonData) {
              console.log(jsonData);                
              $('textarea#MyHtmlArea').val(jsonData);
      });
  });
  </code></pre>
  
  <p>The success function never executes... I checked Fiddler and Firebug, and the code runs successfuly on controller and delivers on client. But then the function is not executed...</p>
  
  <p>Researching, I discovered the success function executes only if we have a valid JSON, then my guess is that my JSON contains HTML code (its for an WYSIWYG editor, like tinymce) getJSON says it is not valid...</p>
  
  <p>So, whats the correct way to send my html snippet using ajax?</p>