Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 942333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:15:18+00:00 2026-05-15T22:15:18+00:00

I have 2 urls /Data and /Data/{month}/{day}/{year}. I’ve created two routes routes.MapRoute( Data_Name, Data,

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:15:19+00:00Added an answer on May 15, 2026 at 10:15 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to have URLs that are even shorter than /{Controller}/{Action}/{Id}. For example, I'd
I have some URLs like http://anytext.a.abs.com In these, 'anytext' is the data that is
I have two projects in a VS 2010 solution: Data and DataForm. In my
I have JSON data which contents Strings and Image URLs, and I already parse
I'm still new at this threading thingy. Lets say I have 50000 URLs and
I have an Android application which talks to a public Data-API by calling URLs.
I have two rails applications App1 and App2 both running on separate URLs but
I have a table of data which contains newsarticles. ive created standard CRUD views/forms
We have a data entry portlet that occassionally generates urls in excess of the
I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png . The Web server (nginx) is configured

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.