title: .net MVC handle view compilation error loaded by ajax
body: <p>I have a view with a compilation error.  This view gets loaded via an ajax call.  I would like to return the compilation error message as a simple string message, but MVC is returning an entire HTML page as an error.  </p>
  
  <p>I have an ajax error handler that looks for the error message in <code>request.responseText</code>, like this:</p>
  
  <pre><code>$(document).ajaxError(function (event, request, settings) {
      ....
      //contains html error page, but I need a simple error message
      request.responseText 
      ....
  });
  </code></pre>
  
  <p>How can I return a simple error message to the ajax error handler when there is a view compilation error?</p>