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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:21:16+00:00 2026-05-14T21:21:16+00:00

I have an MVC app which has its routes defined with the final route

  • 0

I have an MVC app which has its routes defined with the final route being a catch all route to a “PageController” for a database driven collection of pages. What I want to achieve is to be able to plugin to the app a second controller to the catch all route which the first controller passes on to if it does not find the url recieved in the database.

Effectively I want to queue up controllers with catch all actions:

public ActionResult PageCatchall(string url)
{
    var page = repository.Get<Page>(string url);
    if (page != null)
    {
        // Handle the request
       return View(page)
    }
    // Otherwise pass to a new controller

   ????
}

Anyone have any good ideas as to how to solve this? I have tried RedirectToAction but that requires that the next controller has a different route to the action. I have tried ActionInvoker but this failed to work the way I did it.

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

    While I would avoid complex routing like this one, I guess best thing to do is to use custom route constraint that uses cached list of pages to match correct route (have done that with success).

    I’ll leave exact implementation for You as an exercise. ;o)

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

Sidebar

Related Questions

I have an MVC app in Extjs 4 which has a View (extending Ext.panel.Panel
I have successfully created a asp mvc app which basically has interface, service and
I have an asp.net mvc app which has membership implemented. So a user has
I have an MVC 3 web app that has an Action which I need
In my ASP.NET MVC app, I have a fairly complex edit page which combines
In my ASP.NET MVC app, I have an interface which acts as the template
I have an ASP.NET MVC server app and client code which uses jquery. I'd
I have an object which contains models for my ASP.NET MVC web app. The
I have C# MVC web app that has some textboxes that in IE9 you
I have an asp.net mvc app with a route that allows users to request

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.