In Razor pages, I have the following folder structure:
- Areas
- People
- Person
- Jobs.cshtml
- Index.cshtml
- Person
- People
The Index.cshtml page requires an Id of the person to be included as a Path parameter. I have defined the necessary @page directive in the cshtml file. The URL looks like this:
www.website.com/people/person/24
How can I use the @page directive to define the Jobs page to be the following route?
www.website.com/people/person/24/jobs
In other words, how can I do something like this, where pageName resolved to "Jobs"
@page "{personId}/{page}"
Using the reserved {page} routing template ends up returning an encoded route and not just the page name:
24/%2FPerson%2F/Jobs