The relative page path 'About' can only be used while executing a Razor Page. Specify a
In one of your Razor Views, there is an anchor tag that looks something like this:
That syntax (without the forward slash
/) will only work inside a Razor Page.
Inside a Razor View, prefix the Page name with a forward slash
/ like this:
Distinguishing Razor Views from Razor Pages
- Razor Views are usually in a
- Razor Pages are usually in a
Pagesdirectory and have an
@pagedirective at the top of the file.
<a class="nav-link" asp-area="Identity" asp-page="/Account/Manage/ChangePassword">
For creating Razor Page link, add asp-area and then asp-page.