title: MVC3: jquery ajax to return partial view with HTML dataType from controller but getting error
body: <p>I need some help. I am returning partial view as HTML dataType from controller action when calling it from jQuery ajax on button click event.</p>
  
  <p>This is my Javascript tag from my main view:</p>
  
  <pre><code>$(function () {
       $('#searchButton').click(function () {
          var DTO = {
              Name: $('#Name').val()
          };
          $.ajax({
              url: '/Grid/GetSearch',
              type: "GET",
              dataType: "html",
              data: DTO,
              cache: false,
              success: function (data) {
                  //Fill div with results
                  $("#SearchViewDiv").html(data);
              },
              error: function (xhr, status, error) {
                  alert(xhr.responseText);
              }
          });
      });
  });
  </code></pre>
  
  <p>Controller code:</p>
  
  <pre><code>[HttpGet]
      public ActionResult GetSearch(string name)
      {
          var accounts = _userAccounts.FindAll(x =&gt; x.Name.Contains(name));
          return PartialView("SearchResult", accounts);
      }
  </code></pre>
  
  <p>I am able to debug this controller when jQuery ajax is making call to this action but when it is returning I am getting into error function of jQuery Ajax. So guessing target URL is correct. But not able to figure out where I am going wrong. Please let me know if more info is required.</p>