ASP.NET MVC Routing to Controller Sub Folders

I'm a classic ASP/PHP developer that's learning ASP.NET. Because of this and because of the fact I have experience with MVC from CodeIgniter I've been looking at ASP.NET MVC.

I'm looking to eventually redo our current classic ASP application in ASP.NET. The application is quite large and I would have a lot of controllers. In CodeIgniter you can create a sub folder inside the controllers directory. So say I had a subfolder in my controller folder called admin which then had a controller called users I could access the add method by going to:

 - mydomain.com/admin/users/add/param

It would be a lot tidier if I could do something like this with ASP.NET MVC. I've searched around on the internet and found a few solutions that people have come up with but I'm not sure I know enough to make an informed decision on the best way.

Is there a method that is generally accepted to be the 'best' way to do it?
LVL 2
synergiqAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richard LeeSoftware EnthusiastCommented:
A generally accepted best way? I'm not sure if there is, however I have found using attributes on my controller actions to be a useful way. http://stackoverflow.com/questions/894779/asp-net-mvc-routing-via-method-attributes.

As your website if fairly large either you have to create standards when naming routes within your controllers otherwise you can based on the example above build a repository for your routes.

DaTribe
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Frameworks

From novice to tech pro — start learning today.