Visual Studio 2019
Upgrade to the latest release of Visual Studio

ASP.NET Tutorial - Hello World in 10 minutes

Edit your code

Open Pages/Index.cshtml in any text editor and replace all of the code with the following:

Index.cshtml
@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<h1>Hello, world!</h1>
<p>The time on the server is @DateTime.Now</p>

Save the file then refresh the browser to see the change:

When the page is refreshed, the new content you just added will appear on the page.

Continue