Views: Index.cshtml


Index.cshtml is a Razor view file that typically serves as the default view for a controller’s Index action method like
   public IActionResult Index( ) { return View( ); }

C:\ASP.NET-workspace\BookStore1\Views\Home\Index.cshtml
 @{ ViewData["Title"] = "Home Page"; }

 <div class="text-center">
   <h1 class="display-4">Welcome</h1>
   <p>Learn about <a href="https://learn.microsoft.com/aspnet/core">
   building Web apps with ASP.NET Core</a>.</p>
 </div>

The @ symbol is primarily used within Razor views to indicate that the following code is C# code rather than HTML. It acts as a signal to the Razor engine to interpret the code as server-side logic.




      “The problem with life is that your library card    
      has expired by the time you can read women like a book.”    
      — Milton Berle