In the default Visual Studio template for a dynamic data web application, Global.asax includes the following two sample routes.
// route #1
routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") {
Action = PageAction.List,
ViewName = "ListDetails",
Model = model
});
// route #2
routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") {
Action = PageAction.Details,
ViewName = "ListDetails",
Model = model
});
They only differ by the Action property. The comments in Global.asax indicate the two routes are used to configure a single page that handles all CRUD behaviors.
Why is route #2 is necessary? Does it do anything? ListDetails.aspx does not look at the Action property of the route. It seems that everything runs fine when I comment out route #2 and I only have route #1 in Global.asax. Route #2 looks like its not used.