Categories
ASP.MVC url like site/demand/id instead of site/demand/detail/id?
Good afternoon. What code should the controller contain to pick up the URL site/demand/id instead of site/demand/detail/id ?
Answer the question
In order to leave comments, you need to log in
I understand. You need to edit Global.asax. routes.MapRoute( "demand", "demand/{id}", new { controller = "Demand", action = "Index", id=UrlParameter.Optional});
routes.MapRoute( "demand", "demand/{id}", new { controller = "Demand", action = "Index", id=UrlParameter.Optional});
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question