At the heart of the ASP.NET routing feature is the idea of a URL pattern. When a URL is requested, the routing feature compares a list of patterns that you have provided and tries to match one of them to what has been requested. Here is an example of a routing URL:
URL patterns work on segments of a URL. A segment is a section of a URL delimited by the
/ character. Each segment in a pattern is represented by a literal value or a variable. Variables are expressed using braces (
}). In the previous pattern, there are four segments; two of the segments are literal (
Action), and two are variables (
For a URL to match a URL pattern, there must be the same number of segments ...