title: ASP.NET MVC5: Directly view the .cshtml file in browser
body: <p>I am new in ASP.NET MVC, I am trying to open <strong>Navbar.cshtml</strong> in browser directly. After a lots of efforts and seeing results I am not able to open it directly. It is showing me same errors after testing many results.</p>
  
  <p><a href="https://i.stack.imgur.com/RdNwT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RdNwT.jpg" alt="enter image description here"></a></p>
  
  <p>My <strong>Navbar.cshtml</strong> file is in <strong>view folder</strong> directory.</p>
  
  <p><strong>Navbar.cshtml</strong></p>
  
  <pre><code>@{
      ViewBag.Title = "Navbar";
  }
  
  &lt;h2&gt;Navbar&lt;/h2&gt;
  </code></pre>