tags:

views:

122

answers:

4

I want to separate the site administrator area from the main site and want neat urls for the admin side like admin/articles/list etc. How can i implement this feature in asp.net MVC elegantly?

A: 

It's 'routing' you need to look into:

watch this vid on routing - http://www.asp.net/learn/mvc-videos/video-399.aspx

also, this vid addresses routing in a similar fashion to your 'admin area', only in this example it's the "shop" area of the site. take a look - http://www.asp.net/learn/mvc-videos/video-356.aspx (last half of video)

cottsak
+4  A: 

See this article by Phil Haack, part of the ASP.NET MVC team.

Mauricio Scheffer
A: 

@Maush posted a good answer. This has already been asked here in case you needed more references.

Dale Ragan
A: 

Good news - in preview 1 of ASP.NET MVC 2 (released 7/31/09) they have support for areas.

Probably not safe to use just yet, but a feature whose absence has caused me to make a mess of my code so far !

Areas - provide a means of dividing a large web application into multiple projects, each of which can be developed in relative isolation. This helps developers manage the complexity of building a large application by providing a way to group related controllers and views.

Simon_Weaver