我有以下途徑定義:如何擺脫ASP.NET MVC路線中的問號?
{theme}/{subtheme}/{contenttype}/{contentdetail}/Print
當我使用
Url.Action ("PrintLayout","Page",new {contentUrlTitle = Model.ContentUrlTitle}
我得到以下鏈接:
/theme1/subtheme1/contenttype1/myfirstcontenturltitle?action=PrintLayout
我想爲它是一個RESTful URL 。
/theme1/subtheme1/contenttype1/myfirstcontenturltitle/Print
你知道我在這裏錯過了什麼嗎?
你可以添加整個Routes.MapRoute代碼的代碼嗎? – 2011-03-08 10:59:42