开发者

ASP.NET MVC - Organizing Site / URLs

开发者 https://www.devze.com 2022-12-30 06:02 出处:网络
My 开发者_JAVA百科question is around the best practice for dividing up an asp.net mvc web app. I am building a fairly simple application which has two main sections, public and private. Basically I am

My 开发者_JAVA百科question is around the best practice for dividing up an asp.net mvc web app. I am building a fairly simple application which has two main sections, public and private. Basically I am running up against the issue of collisions between controllers. What I want is to have urls like /public/portfolio, but also have /private/portfolio.

Looking into some options, it seems that areas would work well for this situation. Are there other alternatives, such as some creative routing scheme that I should consider?


Take a look at ASP.NET MVC 2.0 areas

http://www.asp.net/mvc/videos/aspnet-mvc-2---areas

That might do the trick.

0

精彩评论

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