asp.net mvc - How to get rid of home controller and preserve other controllers? -


I need to provide the link to my website like this:

  http: / / world Wide Web. Domain.com/contact http://www.domain.com/category/2/category-name http://www.domain.com/article/234/article-subject http://www.domain.com/search / My-search-query  

So I created a path for that:

  route. MapRoute (name: "default", url: "{action} / {Id} / {name}", default: new {controller = "home", action = "index", id = UrlParameter.optional, name = UrlParameter Optional});  

As you can see in the URL without the "Home" controller.

Now I need to provide access to the following URL:

  http://www.domain.com/admin/categories http: //www.domain Com / admin / categories / edit / 12 http://www.domain.com/admin/categories/create  

So here are my questions, how to make "admin" controller accessible is?

I think the "areas" will work here, routing the areas by adding intangibles to a second level Which keeps you integrating your original project structure, while you have permission to add / account / index / marketing / index or sales / index etc. You will consider each "sector" as a separate project.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -