Add razor page

Add razor page

Let us create a folder called Pages at the root of the project and add a razor file inside it

Replace content

Let us replace the content of the Index page as shown below

@page
<!DOCTYPE html>
<html>
  <head>
    <title>ASP Razor</title>
  </head>
  <body>
    <h1>Hello World!!</h1>
  </body>
</html>

Run the app

If we now run the app we still see the old message which is actually a static string and not the page we were expecting:

Last updated