开发者

Can we change the route formate in MVC 2 asp.net

As i read about url routing from : http://www.codethinked.com/post/2008/08/20/Exploring-Syste开发者_StackOverflow中文版mWebRouting.aspx

I found , "Each url coming into the application will be matched against the list of Routes that you have defined, and if one matches then it will be used"

Is this means we can define our own patterns of urls? except "Controller//Action//ID" ?


http://www.asp.net/mvc/tutorials/creating-custom-routes-cs

http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx


Is this means we can define our own patterns of urls? except "Controller//Action//ID" ?

Yes you can, search for Routes / RouteCollection and you should find plenty of info.

Also that default route is defined in your code, see the global.asax in the default asp.net mvc site you get when creating a new project.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜