routing in asp.net mvc.
Posted
by
andrew Sullivan
on Stack Overflow
See other posts from Stack Overflow
or by andrew Sullivan
Published on 2010-10-14T14:23:23Z
Indexed on
2010/12/26
4:54 UTC
Read the original article
Hit count: 259
asp.net-mvc
I have a route
routes.MapRoute("BuildingProject", "BuildingProject/{action}/{id}", new { controller = "Home", action = "Index", id = "" });
i want it to behave like default route ie for url that starts with BuildingProject like http://localhost:4030/BuildingProject/DeleteAll. I tried
routes.MapRoute("BuildingProject", "BuildingProject/{action}/{id}", new { controller = "Home", action = "", id = "" });
It worked.But on typing localhost:4030/BuildingProject it is not redirecting to it's Index but showing error.
.How to do this.
© Stack Overflow or respective owner