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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:17:53+00:00 2026-05-17T21:17:53+00:00

Is there a way within asp.net MVC 2 whereby I can route a request

  • 0

Is there a way within asp.net MVC 2 whereby I can route a request and have a portion of the URL ignored and passed to the controller as a variable?

My needs state that I must store pages dynamically in a database, and they should be accessible by looking at the URL and reading the URL segments to find the relevant page. Effectively, I need a Site controller, to which the remaining portion of the URL will be passed.

Site-Controller/this/is/a/page

So this in case the site controller would pick up the /this/is/a/page ‘string’

Is this possible?

Thanks!

  • 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-17T21:17:54+00:00Added an answer on May 17, 2026 at 9:17 pm

    Create a wildcard Route in Global.asax which captures everything after the first segment of the url and passes it to your Action method:

    routes.MapRoute("Page", 
                    "Site-Controller/{*urlsegments}",
                    new { 
                      controller = "Site-Controller",
                      action = "YourAction",
                      urlsegments = ""
                    });
    

    Make sure your Action method accepts a ‘urlsegments’ parameter and you can work with it from there:

    public ActionResult YourAction(string urlsegments)
    {
        // Do something with the segments here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to map the Areas within an ASP.NET MVC 2 application
Is there any way to render ASP.net MVC controls or code directly within a
Is there a way to stream a file using ASP.NET MVC FileContentResult within the
How do you get the current path (url) from within an asp.net mvc view?
Is there a way, within the .net framework, to check to see if two
Is there a way to perform an HTTP GET request within a Visual Basic
Is there any way i can access the page object from within the global.asax
I know that I can use normal html files in ASP.NET MVC; however I
I have a asp.net MVC app and I'm trying to get the jqgrid 3.5
I have an ASP.Net MVC site, which connects to a web service. The site's

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.