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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:15:28+00:00 2026-05-10T21:15:28+00:00

I’m trying to create routes which follow the structure of a tree navigation system,

  • 0

I’m trying to create routes which follow the structure of a tree navigation system, i.e I want to include the entire path in the tree in my route. So if I had a tree which looked like this

  • Computers
    • Software
      • Development
      • Graphics
    • Hardware
      • CPU
      • Graphics cards

Then I would like to be able to have routes that looks like this

  • site.com/catalog/computers/software/graphics

This, on it’s own is not hard and can be caught by a route which looks like this

  • catalog/{*categories}

However I want to be able to add the product information at the end of that URL, something like this

  • site.com/catalog/computers/software/graphics/title=Photoshop

Which would mean I would requite routes that were defined like the following examples

  • site.com/{*categories}/title={name}
  • site.com/{*categories}

However the first of these routes are invalid since nothing else can appear after a greedy parameter such as {*categories} so I’m a bit stuck. I’ve been thinking of implementing regex routes or perhaps use IRouteContraint to work my way around this but I can’t think of a decent solution that would enable me to also use the Html.ActionLink(…) method to generate outbount URLs which filled in both {*categories} and {name}

Any advice is greatly apprechiated!

Some of you may have seen a similar question by me yesterday but that was deleted, by me, since I’ve since given it more thought and the old question contained incomplete descriptions of my problem

UPDATE 2008/11/26 I posted the solution at http://thecodejunkie.blogspot.com/2008/11/supporting-complex-route-patterns-with.html

  • 1 1 Answer
  • 1 View
  • 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-10T21:15:29+00:00Added an answer on May 10, 2026 at 9:15 pm

    Routes ignore query string parameters. But at the same time, query string parameters are passed in to an action method as long as there isn’t a route URL parameter of the same name. So I would use just the second route, and pass in title via the query string.

    Another option is more complicated. You write a custom route that derives from Route and override the GetRouteData method so that it parses the value of ‘categories’ (something like RouteData.Values[‘categories’] and then add the parsed data to the route value dictionary (RouteData.Values[‘title’] = parsedTitle.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into

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.