diff --git a/aspnetcore/razor-pages/index.md b/aspnetcore/razor-pages/index.md index c42f9c562b..1dedfe1260 100644 --- a/aspnetcore/razor-pages/index.md +++ b/aspnetcore/razor-pages/index.md @@ -168,7 +168,7 @@ The *Index.cshtml* file contains the following markup to create an edit link for [!code-cshtml[](index/sample/RazorPagesContacts/Pages/Index.cshtml?range=21)] -The [Anchor Tag Helper](xref:mvc/views/tag-helpers/builtin-th/anchor-tag-helper) used the `asp-route-{value}` attribute to generate a link to the Edit page. The link contains route data with the contact ID. For example, `http://localhost:5000/Edit/1`. +The [Anchor Tag Helper](xref:mvc/views/tag-helpers/builtin-th/anchor-tag-helper) used the `asp-route-{value}` attribute to generate a link to the Edit page. The link contains route data with the contact ID. For example, `http://localhost:5000/Edit/1`. Use the `asp-area` attribute to specify an area. For more information, see . The *Pages/Edit.cshtml* file: @@ -396,6 +396,14 @@ Relative name linking is useful when building sites with a complex structure. If ::: moniker range=">= aspnetcore-2.1" +To redirect to a page in a different [Area](xref:mvc/controllers/areas), specify the area: + +```csharp +RedirectToPage("/Index", new { area = "Services" }); +``` + +For more information, see . + ## ViewData attribute Data can be passed to a page with [ViewDataAttribute](/dotnet/api/microsoft.aspnetcore.mvc.viewdataattribute). Properties on controllers or Razor Page models decorated with `[ViewData]` have their values stored and loaded from the [ViewDataDictionary](/dotnet/api/microsoft.aspnetcore.mvc.viewfeatures.viewdatadictionary). @@ -542,7 +550,7 @@ services.AddMvc() * * -* +* * * *