/Customers/Edit/1/ALFKI matches both the
PageWithId routes. As a result, the first matching route will be selected -
PageWithSort - and the
ALFKI string will be available as a parameter called
Since your action doesn't take a parameter called
SortColumn, and the route doesn't contain any data for a parameter called
id, the parameter will be set to
You can see this for yourself using the ASP.NET Routing Debugger[^] package.
You'll need to rename the parameters on your actions so that they match the parameters in the route. Since the
PageWithSort route will match anything that the other two routes would, that's the one you need to match.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."