I have 2 urls /Data and /Data/{month}/{day}/{year}.
I've created two routes
routes.MapRoute(
"Data_Name",
"Data",
new { controller = "Data", action = "DataForAnyDate" }
);
routes.MapRoute(
"DataFullDate",
"Data/{month}/{day}/{year}",
new { controller = "Data", action = "DataForSpecificDate"}
);
when I go to /Data, it all works, and view I see is Views/Data/DataForAnyDate and controller is Data.DataForAnyDate. When I go to /Data/12/29/2009 I want same asp page (same view), but filled with data from specific date, thus I use Data.DataForSpecificDate controller. But issue is that mvc keeps looking for my view in Views/Data/DataForSpecificDate and I want it to look in Views/Data/DataForAnyDate.
Is there a way to tell Data.DataForSpecificDate to go into Views/Data/DataForAnyDateview, or is there some other way to solve this problem?
Thanks
--MB