MVC - URL Routing
The segments in an examle URL The first segment contains the word Admin , and the second segment contains the word Index . To the human eye, it is obvious that the first segment relates to the controller and the second segment relates to the action. But, of course, we need to express this relationship in a way that the routing system can understand. Here is a URL pattern that does this: {controller}/{action} or {controller}/{action}/id or {controller}/{action}/id?querystring2=&querystring3= Note : id, querystring2, and querystring 3 is a parameter in the controller . When processing an incoming request, the job of the routing system is to match the URL that has been requested to a pattern and extract values from the URL for the segment variables defined in the pattern. The segment variables are expressed using braces (the { and } characters). The example pattern has two segment variables with the names controller and action , and so the value of the controller seg...