views:

20

answers:

1

I'm using the following route

routes.MapRoute(
    "PatientList",
    "User/{SearchName}/{LocationID}/{Page}",
    new { controller = "User", action = "Index", SearchName = "", LocationID = 0, Page = 1 }
); 

It fails on the following URL: /user//1/1

Can anyone tell me what I'm doing wrong?

+1  A: 

The URL /user//1/1 is interpreted by ASP.NET as a request for /user/1/1. Only the last parameters can be optional. You can't skip a parameter this way.

René Wolferink