I am working in an ASP.NET Core project with Razor pages and I am trying to make this URL pattern
/{clientName}/Forms/{page}
acceptable to route. You should know I'm using Razor Pages NOT MVC.
clientName
is any stringForms
is areapage
is any page in forms areaI did something similar in MVC, but it didn't work for me in this case.
Now I want to get clientName
in OnGet
method. How can I do this?
What are the changes I should add to Program.cs
?
Change the name of the page
parameter to something like pageName
. page
is a reserved word in Razor Pages.