开发者

mvc lowercase route (error im getting is "RouteCollection is a nested class"

so i know there's this 2 main links talking about lowering the cases for the urls, here they are respectively:

How can I have lowercase routes in ASP.NET MVC?

http://goneale.com/2008/12/19/lowercase-route-urls-in-aspnet-mvc/

anyway, they're basically identical but my problem is on the RouteCollectionExtensions class that has a MapLowercaseRoute method. It's giving me a "Extension method must be defined ina top level static class; RouteCollectionExtensions i开发者_JS百科s a nested class."

which kind of makes sense cuz it's just looping around but I basically used the same codes on that 2nd link.. any thoughts?


Move the RouteCollectionExtensions class into a separate .cs file, don't nest it inside some existing class.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜