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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:42:45+00:00 2026-05-31T15:42:45+00:00

How is this achievable in asp.net mvc? I have seen some ruby examples out

  • 0

How is this achievable in asp.net mvc? I have seen some ruby examples out there…

Github like routes in Rails

i.e. nested folders, can be unlimited… however they are usually nested once

e.g.

lets say my main route in my app is:

/projects/{projectid}/

I am hooked into a file system, so I want users to navigate through whatever directory structure so I can have:

/projects/{projectid}/foldera/
/projects/{projectid}/folderb/
/projects/{projectid}/foldera/pic1.png
/projects/{projectid}/folderb/special/car134d.jpeg

etc…

This way I can only show files or pictures that are inside the url/directory the user is in…

  • 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-31T15:42:46+00:00Added an answer on May 31, 2026 at 3:42 pm

    I think what you’re after is the {*queryvalues} segmented url handler for routing. The * indicates a wildcard-style match of one or more segments, delimited by a “/”.

    To map to a physical path, you can use this to add a route to your Global.asax.cs:

    routes.MapPageRoute(
                "Projects", // Route name
                "projects/{projectId}/{*path}", // Route url format
                "~/ProjectFolder/{projectId}/{path}" // Path to files
                );
    

    If you want to get the path into an MVC Controller Action and then do something with it, you could use MapRoute:

    routes.MapRoute(
                "Projects", // Route name
                "projects/{projectId}/{*path}", // Route url format
                new { controller = "Project", action = "Index" } // Defaults
                );
    

    Then create a ProjectController, and in the Index action retrieve RouteData.Values["projectId"] and RouteData.Values["path"] and do whatever you need to with them…

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

Sidebar

Related Questions

For a scenario, I have a ASP.NET MVC application with URLs that look like
I have an ASP.NET MVC project containing an AdminController class and giving me URls
This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit
I'm currently using jqGrid and ASP.Net MVC. With my current project, my goal is
Is this easily achievable with MS-DOS scripts, or would I have to resort to
This is starting to vex me. I recently decided to clear out my FTP,
This might seem like a stupid question I admit. But I'm in a small
This is my first post here and I wanted to get some input from
I'd like to have a logo (say it's square for simplicity) with 4 links
I have a for loop as below which populates this data into an array.

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.