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

  • SEARCH
  • Home
  • 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 844447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:17:14+00:00 2026-05-15T06:17:14+00:00

Hoping for some help after reading into MVC routing and not coming up with

  • 0

Hoping for some help after reading into MVC routing and not coming up with the answer myself.

I have the following routes registered:

public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            null,
            "YourFeedback/Article/{resourceId}",
            new { controller = "YourFeedback", action = "Index", contentTypeId = new Guid(ConfigurationManager.AppSettings["ArticleLibraryId"]) });

        routes.MapRoute(
            "Default",                                              // Route name
            "{controller}/{action}/{id}",                           // URL with parameters
            new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
            );
    }

I have the following ActionLink in an aspx view:

<%=Html.ActionLink("Your Feedback", "Article", "YourFeedback", new
 {
     resourceId = Model.ContentId.ResourceId
 }, new { @class = "yourFeedback" })%>

My understanding of MVC routing is that this would render a anchor link with href of “/YourFeedback/Article/101” where 101 comes from Model.ContentId.ResourceId.

Yet the anchor link href is rendered as “YourFeedback/Article/resourceId=101”.

Any ideas where I’m going wrong?

Thanks in advance.

  • 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-15T06:17:15+00:00Added an answer on May 15, 2026 at 6:17 am

    This is because your actionlink will match the second route and not the first. The reason is that you have some strange default values in your first route. You have set the controller to “YourFeedback” and the action to “Index”. That means that you will have to set that in your actionlink as well if you want to match that route.

    To match the route you will have to use this actionlink:

    <%=Html.ActionLink("Your Feedback", "Index", "YourFeedback", new
    {
        resourceId = Model.ContentId.ResourceId
    }, new { @class = "yourFeedback" })%>
    

    Or change the route.

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

Sidebar

Related Questions

I have a small problem that I am hoping to get some help with.
I'm hoping people have some ideas to help solve this problem. I am developing
Hi guys I was hoping from some help here, please. I have a INSERT
I was hoping for some help on this as I'm really stuck after trying
I'm hoping to get some help coming up with a faster way to do
I have a problem with my code and I was hoping for some help.
Hoping to get some help or direction with the following issue I am facing.
I am having troubles with jQuery's load function and am hoping for some help.
I was hoping to get some help with my SQL Server script. Basically, I
Am having some trouble with the SkyDrive download process and hoping you can help

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.