title: ASP.NET View Not Found
body: <p>I created a Web API project in Visual Studio. I am using attribute routing. Here is the controller under Controllers folder:</p>
  
  <pre><code>public class RegistrationController : Controller
  {
      // GET: Registration
      [Route("")]
      public ActionResult CreateUser(string platform)
      {
  
           return View("~/Views/Registration/CreateUser.cshtml", platform);
      }
  }
  </code></pre>
  
  <p>When I call the <code>CreateUser</code> action by the URL <code>http://localhost/application</code> it works but when I try to pass a query string parameter by the URL <code>http://localhost/application?platform=android</code>, it gives the following error:</p>
  
  <blockquote>
    <p><em>The view '~/Views/Registration/CreateUser.cshtml' or its master was not found or no view engine supports the searched locations. The
    following locations were searched:</em></p>
    
    <p><em>~/Views/Registration/CreateUser.cshtml</em></p>
    
    <p><em>~/Views/Registration/android.master</em></p>
    
    <p><em>~/Views/Shared/android.master</em></p>
    
    <p><em>~/Views/Registration/android.cshtml</em></p>
    
    <p><em>~/Views/Registration/android.vbhtml</em></p>
    
    <p><em>~/Views/Shared/android.cshtml</em></p>
    
    <p><em>~/Views/Shared/android.vbhtml</em></p>
  </blockquote>
  
  <p>I cannot understand why it cannot find the view when it is there or why it even tries to find a view with the name of the query string parameter.</p>