title: how to redirect to another action on mvc controller?
body: <p>I have an asp.net mvc 4 application has the following Index action:</p>
  
  <pre><code>public ActionResult Index()
  {
      if (User.IsInRole("dealer"))
      {
          return View(db.Commissions.Where(c =&gt; c.Dealer.Name == User.Identity.Name));
      }
      else
      {//admin
          return View(db.Commissions);
      }
  }
  </code></pre>
  
  <p>I would like to redirect my page to another mvc action called filter but cant get it done with this code:</p>
  
  <pre><code>   $(function () {
          jQuery.noConflict()
          $("#datefrom").datepicker();
          $("#dateto").datepicker();
  
          $("#btnfilter").click(function () {
              $.ajax({
                  type: "get",
                  url: "/commissions/filter/",
                  data:{'from':$("#datefrom").val(),to:$("#dateto").val()}
                  ,success: function(result){
                      if(result.Success){
                          window.location = "/Filter/Commissions" + $("#datefrom").val() + $("#dateto").val();
                      }
                  }
              });
          });
  
      });
  </code></pre>
  
  <p>this is the filter action:</p>
  
  <pre><code> public ActionResult Filter(DateTime from, DateTime to)
          {
              if (User.IsInRole("dealer"))
              {
                  return View(db.Commissions.Where(c =&gt; c.Dealer.Name == User.Identity.Name &amp;&amp; c.CreatedDate&gt;=from &amp;&amp; c.CreatedDate &lt;=to));
              }
              else
  
              {//admin
                  var test = db.Commissions.Where(c =&gt; c.CreatedDate &gt;= from &amp;&amp; c.CreatedDate &lt;= to);
                  return View(db.Commissions.Where(c=&gt;c.CreatedDate &gt;= from &amp;&amp; c.CreatedDate &lt;= to));
              }
          }
  </code></pre>
  
  <p>The filter action is hit on the server but I get the following error when i look in the fiddler:</p>
  
  <pre><code>[InvalidOperationException: The view 'filter' or its master was not found or no view engine supports the searched locations. The following locations were 
  </code></pre>
  
  <p>How can i fix this?</p>