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 188169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:57:28+00:00 2026-05-11T15:57:28+00:00

There seem to be a lot of issues on SO dealing with MapRoute problems.

  • 0

There seem to be a lot of issues on SO dealing with MapRoute problems. I’ve read through a bunch of them, but I can’t see what I’m doing wrong in my implementation. I’ve got the following routes set up:

routes.MapRoute( _     'FilesDisplay', _     '{controller}/{action}/{year}/{month}', _     New With {.controller = 'Files', .action = 'Display', .year = '', .month = ''})  routes.MapRoute( _     'Default', _     '{controller}/{action}', _     New With {.controller = 'Files', .action = 'Index'}) 

and the following RouteLink:

<%=Html.RouteLink('Show', 'FilesDisplay', New With {.year = 2008, .month = 5})%> 

However, the resulting URL for ‘Show’ is /Files/Index/2008/5. Why is it picking up the Index action instead of the Display action?

Edit: As a lark I changed the second route to .action = 'Display' just to see if I could get the URL to change, and it still resolves to /Files/Index/2008/5.

Edit 2: I also tried:

<%=Html.ActionLink('Show', 'Display', 'Files', New With {.year = 2008, .month = 5}, Nothing)%> 

but that also resolves to /Files/Index/2008/5. Why is it that no matter what I specify for an action it’s defaulting to Index?

  • 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. 2026-05-11T15:57:28+00:00Added an answer on May 11, 2026 at 3:57 pm

    Upgrading to MVC RC 1.0 seemed to fix ActionLink but not RouteLink. Therefore I’m moving forward with ActionLink. I’d love to know why RouteLink doesn’t want to work though.

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

Sidebar

Related Questions

It seems like a lot of people struggle with date/time issues in PHP, and
I've found a lot of variations to this question within SO, but it seems
I have hit a problem with the Perfarce extension that I can’t seem to
I've noticed that there are about 30 forks of Django Piston on GitHub: https://github.com/search?q=django-piston&type=Everything&repo=&langOverride=&start_value=1
Im having problems when calling a command right after the Focus() call. The command
I'm working on a project where we need to have data entered or updated
I have a nicely decoupled app and dependency-injected app that uses Entity Framework 4.1
I am having an issue that is stumping me. I have a relatively simple
I enjoy making games and now for the first time try myself out on
I'm trying to clean up an older ASP.NET WebForms site that has ViewState enabled

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.