Articles → ASP.NET CORE → Routing In Asp.Net Core
Routing In Asp.Net Core
Routing The Asp.Net MVC Application
Routing In Asp.Net Core
Rule | URL | Description |
---|
Routes are mapped to physical view files (without extension) | http://localhost/index | The URL is mapped to the physical file "index.cshtml". |
"Index.cshtml" is the default document | http://localhost | The URL is mapped to "index.cshtml". |
Folder name is added in the URL | http://localhost/Admin/privacy | The URL is mapped to "privacy.cshtml" inside the "Admin" folder. |
How Is Routing Configured In Startup.Cs?
Click to Enlarge
- Creating an area
- Views and Controllers on the root of the project folder
Click to Enlarge