title: loading an html partial view with jquery get
body: <p>I would like to load an html partial view in a div using Jquery and a Get method (i don't want a post).
  But i have an error  "JsonRequestBehavior" need AllowGet.</p>
  
  <p>I don't understand this error because my dataType is html not json.
  fiddler show a header with "Accept: text/html, <em>/</em>; q=0.01".</p>
  
  <p>How can i load my partial view ?</p>
  
  <p>my html</p>
  
  <pre><code>&lt;div id="view" class="box"&gt;
  &lt;/div&gt;
  &lt;button id="button" type="button"&gt;Next &gt;&lt;/button&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
          $("#button").click(function () {
  $.ajax({
                  type: "GET",
                  dataType: 'html',
                  url: "/declarations/ValiderHeures/1234/15-06-2013/",
                  sucess: function (result) {
                      alert('ok');
                      // replace html div
                  }
              });
  );
  &lt;/script&gt;
  </code></pre>
  
  <p>my controller</p>
  
  <pre><code>public ActionResult ValiderHeures(Int32 id, DateTime date)
  {
     FaireUneDeclarationViewModel vm = new FaireUneDeclarationViewModel();
     vm.Load(User.Identity.Name, this.UserId.Value);
     return (vm);        
  }
  </code></pre>
  
  <p>I have found my problem:</p>
  
  <p>Thanks , i have found my error:</p>
  
  <p>in my base controller i have:</p>
  
  <pre><code>protected override void OnException(ExceptionContext filterContext)
          {
              if (filterContext.HttpContext.Request.IsAjaxRequest())
              {
  ....
  filterContext.Result = new JsonResult { Data = new GenericJsonResult() { Message = filterContext.Exception.Message == null ? "Une erreur a été détectée !" : filterContext.Exception.Message, Error = true } };
  ....
  }
  }
  </code></pre>
  
  <p>the error is in the wiew, and my base controller errorException return a Json result.</p>