Currently I have two controllers
1 - Parent Controller
2 - Child Controller
I access my Parent Controller like this
someurlparentcontroller
Now I want to access my children controller like this
someurlparentcontroller1childcontroller
This last url should return all the children of a particular parent.
I have this route currently in my global.asax file
routes.MapHttpRoute ("Route1", "{controller}/{id}", new { id = RouteParameter.Optional });
I am not sure how can I achieve my parentidchild
hierarchy.. How should I configure my routes to achieve this? Ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…