title: Error: The view or its master was not found. The following locations were searched
body: <p>I have an issue with a particular controller action not displaying the view.</p>
  
  <p>Here is the Controller Action:</p>
  
  <pre><code>public ActionResult DisplayStudents(string id)
          {
              var name = (from p in data.StudentTable.Where(a =&gt; a.ClassNumberID == id)
                                    group n by n.StudentName into g
                                    select g.Key).First();
  
              return View(name);
          }
  </code></pre>
  
  <p>Controller Name is "Student" and the view is present in "Views/Student/DisplayStudents.aspx"</p>
  
  <p>Why do I still get this error:</p>
  
  <pre><code>Server Error in '/' Application.
  --------------------------------------------------------------------------------
  
  The view 'Thomas Guenn' or its master was not found. The following locations were searched:
  ~/Views/Student/Thomas Guenn.aspx
  ~/Views/Student/Thomas Guenn.ascx
  ~/Views/Shared/Thomas Guenn.aspx
  ~/Views/Shared/Thomas Guenn.ascx 
  </code></pre>
  
  <p>Also, why is it looking for "Thomas Guenn.aspx" instead of "DisplayStudents.aspx" ?</p>
  
  <p>Here is my View page:</p>
  
  <blockquote>
    >" %>
    
    <p> 
        DisplayStudents  
        
        Students are listed below:
        </p>
  
  <pre><code>&lt;table&gt;
  
  &lt;% foreach (var item in Model) { %&gt;
       &lt;tr&gt;
          &lt;td&gt;
              &lt;%= Html.Encode(item)%&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;% } %&gt;
  
  &lt;/table&gt; &lt;/body&gt; &lt;/html&gt;
  </code></pre>
  </blockquote>