Its a process of redirecting an HTTP Request to the controller and action. Or we can say ASP.Net Routing is a pattern system that is responsible for mapping coming request to specified controller and action in pattern.
When ASP.net application starts (Launch) then the application register all the patterns with ASP.Net framework "Rout Table" to tell the routing engine what to do for any request and pass that request to controller and action which specified in pattern of routing table.
Reference img: www.c-sharpcorner.com
In above figure, we can see how the routing engine processes a request and what response it sends. It gives a response according to URL match or not in the route table.
- When the request's URL matches any of the registered route patterns in the route table then the routing engine forwards the request to the appropriate handler for that request. Thereafter the route is processed and gets a view on the UI.
- When the request's URL does not match any of the registered route patterns then the routing engine indicates that it could not determine how to handle the request by returning a 404 HTTP status code.