To specify a route you need to create the instance of the class Route by specifying the
* URL Pattern Name
* URL Pattern
* Handler
URL Name
Can be of any name and empty string '' is allowed
URL Pattern
Default (System generating) URL pattern is {controller}/{action}/{id}, however you can use the following patterns as you want
employee/{action}/{entry} --> employee/update/111
{reportname}/{year}/{month} --> employeeattendance/2018/06
{classcode}-{studentid}/{action} --> XII/212/show
Handler
There are three types of handlers used,
MvcHandler, This handler is initiating the ASP.NET pipeline for the ASP.NET MVC application, as this is receiving the controller instance from MVC controller factory, which takes care of further processing
MvcRouteHandler
MvcRouteHandler is implementing the IRouteHandler interface and pass the request context to it.
MvcHttpHandler
Used to handle the mapping directly without going through the routing module, this class will not be
(To be continued)
Comments