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 t开发者_运维知识库hat 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
In the DataForSpecificDate method of your DataController, specify the view by ending with Return View("DataForAnyDateview")
Since your controller code is not posted here, I'm making the assumption u might just have Return View(); in which case it would look for a view with the same name as the method.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论