title: Call Controller Method Which Return View With Ajax Call From Asp.net View Page
body: <p>I have button. I want to route new view when i clicked the button. The button is like below:</p>
  
  <pre><code>&lt;button type="button" id="btnSearch" class="btn btn-warning" style="height:35px;width:120px"&gt; &lt;i class="fa fa-search" aria-hidden="true"&gt;&lt;/i&gt; &lt;translate&gt;Search&lt;/translate&gt; &lt;/button&gt;
  </code></pre>
  
  <p>when button is clicked and than the method which is below run:</p>
  
  <pre><code>$('#btnSearch').click(function () {
          return $.ajax({
              url: '@Url.Action("test", "ControllerName")',
              data: { Name: $('#Name').val() },
              type: 'POST',
              dataType: 'html'
          });
      });
  </code></pre>
  
  <p>my controller action is  below:</p>
  
  <pre><code>   public ActionResult test(string CityName) {
              ViewBag.CityName = CityName;
              return View();
                            }
  </code></pre>
  
  <p>when i debug my program, flow came to my controller action. But index web page don't route to the test view page. Error is not occurred. What can i do for this state ? </p>