Professional Documents
Culture Documents
Lab02 WebApplication
Lab02 WebApplication
To test the application, press Ctrl + F5 and you will get a window like the following.
using System.ComponentModel.DataAnnotations;
namespace RazorPagesMovie.Models;
To create the Pages/Movies folder, first right-click on the Pages folder > Add > New
Folder and name the folder Movies.
Configure the parameters as follows to complete adding Razor Pages.
Add-Migration InitialCreate
Update-Database
At line 6, when we change the value within the <title> tag, it will change the title of the
webpage.
At line 15, change the value from
<a class="navbar-brand" asp-area="" asp-page="/Index">Duy's Movie Storage'</a>
To
The anchor element above is a Tag Helper, specifically the Anchor Tag Helper. Here, the
attribute-value pair asp-page="/Movies/Index" generates a link to the /Movies/Index
Razor Page. Since the value of the asp-area attribute is empty, no area is incorporated
into the link.