The question is I have a site that I need to have a url like /home/leadership/team/users/member-1. How would one stucture the site folders and routes to handle this. I have attached a pic. In the pic the items in orangeish are in question. Click reply to
see pic then click pic to view. Thanks!
So if I am understanding correctly if I wanted to have a url in an MVC 3 site like the link you provided. I would have to do it routes. Correct? Or is there a way to complete this by folder structure. Areas and the like?
SaNtoG
Member
48 Points
17 Posts
Simple MVC 3 Folder Structure For Deep Navigation
Feb 23, 2012 04:04 PM|LINK
The question is I have a site that I need to have a url like /home/leadership/team/users/member-1. How would one stucture the site folders and routes to handle this. I have attached a pic. In the pic the items in orangeish are in question. Click reply to see pic then click pic to view. Thanks!
SaNtoG
Member
48 Points
17 Posts
Re: Simple MVC 3 Folder Structure For Deep Navigation
Feb 23, 2012 06:58 PM|LINK
Bump. Help..
CodeHobo
All-Star
18647 Points
2647 Posts
Re: Simple MVC 3 Folder Structure For Deep Navigation
Feb 23, 2012 07:50 PM|LINK
With ASP.NET MVC the folder structure has no bearing on the URL. You can get a url like that using a custom route in the route table.
See the following
http://www.asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs
Blog | Twitter : @Hattan
SaNtoG
Member
48 Points
17 Posts
Re: Simple MVC 3 Folder Structure For Deep Navigation
Feb 24, 2012 03:33 PM|LINK
Thanks for your reply CodeHobo.
So if I am understanding correctly if I wanted to have a url in an MVC 3 site like the link you provided. I would have to do it routes. Correct? Or is there a way to complete this by folder structure. Areas and the like?
Thanks in advance.
bruce (sqlwo...
All-Star
36852 Points
5446 Posts
Re: Simple MVC 3 Folder Structure For Deep Navigation
Feb 24, 2012 03:53 PM|LINK
in MVC urls map to controller actions via routes. so if you want a folder structure its done with routes.