开发者

Problem with custom routes

I'm us开发者_如何学JAVAing 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜