Routing engine in MVC Application
Above photo shows the default routes.
The first route instructs the routing engine to ignore requests for .axd resources such as "ScriptResource.axd" and "WebResource.axd " .
These resources don’t physically exist as files in the application; rather, they are HttpModules that load special content (such as images, scripts, CSS, etc.) that are embedded in DLL files so that they can be sent to the browser as part of the response.
The second route is used to map requests to controllers and action methods.
For example :
Syntax is as follow :
where :
- controller - shows default controller name (Home is in example)
- action - View name contained within controller(Index is in example)
- id - Optional parameter