Razor Pages assets (.cshtml files) will be searched in the following folders and order:
- Current folder inside Pages
- /Pages/Shared/
- /Views/Shared/
This means that the view name, as requested by the user, or layout, will be looked for first in the current folder (as per the request's path), then in the /Pages/Shared folder, and lastly in /Views/Shared—all relative to the root folder of the application.
So, after learning the basics, let's jump into the page model, a very important concept.