Last post Feb 24, 2012 03:53 PM by bruce (sqlwork.com)
Feb 23, 2012 04:04 PM|SaNtoG|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!
Feb 23, 2012 06:58 PM|SaNtoG|LINK
Feb 23, 2012 07:50 PM|CodeHobo|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
Feb 24, 2012 03:33 PM|SaNtoG|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.
Feb 24, 2012 03:53 PM|bruce (sqlwork.com)|LINK
in MVC urls map to controller actions via routes. so if you want a folder structure its done with routes.