title: C# MVC RedirectToAction not working?
body: <p>So I want to create a new view in my MVC application that allows a user to enter parameters for searching. I want to pass these parameters to another View/Controller and I want the controller to call an action called "Search" to handle these parameters and return the correct data. However, when I try to "Redirect" it is giving me a problem. It says the resource cannot be found, </p>
  
  <pre><code>The view 'Search' or its master was not found or no view engine supports the searched locations.
  The following locations were searched:
  
  ~/Views/Question/Search.aspx
  </code></pre>
  
  <p>This is the code.</p>
  
  <pre><code>[HttpPost]
             public ActionResult HandleForm()
             {
                 SearchQuery search = new SearchQuery();
                 if(Request["QuestionID"].Trim()!="")
                  search.QuestionID = Convert.ToInt32(Request["QuestionID"].Trim());           
  
  
  
  return RedirectToAction("Search", "Question");                 
  }
  </code></pre>
  
  <p>However, if I change "Search" to "Index" it loads the page I desire because it opens the view within that page. It does not call the search action. Why is this method returning the View when every example I've read states that the name of the Action needs to be passed?</p>
  
  <p>For those who are wondering this is my global.asax routing info </p>
  
  <pre><code>routes.MapRoute(
              "Default", // Route name
              "{controller}/{action}/{id}", // URL with parameters
              new { controller = "Home", action = "Index", id = UrlParameter.Optional } 
  </code></pre>
  
  <p>Last but not least, I have yet to look into how to pass these parameters, but I hope it won't be too much extra work once I can figure out why this is not working as desired. </p>