开发者

routing problem in asp.net mvc 3.0

开发者 https://www.devze.com 2023-02-20 02:32 出处:网络
When I try sample application which is made as defa开发者_如何学Cult with asp.net mvc 3.0, the home and about links just work fine. But whenever I try to add custom route data in global.asax like

When I try sample application which is made as defa开发者_如何学Cult with asp.net mvc 3.0, the home and about links just work fine. But whenever I try to add custom route data in global.asax like controller/action/id=urlhelper.optional,param=urlhelper.optional and run the project, all the links' href just vanishes. ie. <a href="">Home</a> like markup gets generated. Please help. Thanks, Gaurav


This is a known bug in MVC 3. Here is a blog post: http://haacked.com/archive/2011/02/20/routing-regression-with-two-consecutive-optional-url-parameters.aspx

0

精彩评论

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