B
B
Bushka2012-01-16 10:40:58
ASP.NET
Bushka, 2012-01-16 10:40:58

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

1 answer(s)
B
Bushka, 2012-01-16
@Bushka

I understand. You need to edit Global.asax.
routes.MapRoute(
"demand",
"demand/{id}",
new { controller = "Demand", action = "Index", id=UrlParameter.Optional});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question