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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:11:10+00:00 2026-06-06T11:11:10+00:00

Some background: I create a new ASP.NET MVC 3 WebApplication. Then I add a

  • 0

Some background:
I create a new ASP.NET MVC 3 WebApplication.
Then I add a Webforms page: ~/ASPWebforms/Test.aspx
Then I edit the routing in the Global.asax file like this:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.MapPageRoute("Test", "Test/", "~/ASPWebforms/Test.aspx");
    routes.MapRoute(
        "Default", // Route name
        "{controller}/{action}/{id}", // URL with parameters
        new { controller = "Home", action = "Index", id = UrlParameter.Optional }
    );
}

Now I type in my browser http://localhost:54847/Test and everything works as expected.

The problem is that all other links look like that: http://localhost:54847/Test?action=Index&controller=Home

I also tried to change the order of the routes:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.MapRoute(
        "Default", // Route name
        "{controller}/{action}/{id}", // URL with parameters
        new { controller = "Home", action = "Index", id = UrlParameter.Optional }
    );
    routes.MapPageRoute("Test", "Test/", "~/ASPWebforms/Test.aspx");
}

but then http://localhost:54847/Test won’t work anymore.

I’m expecting the link http://localhost:54874/Test to go to ~/ASPWebforms/Test.aspx
And the other links work as usual mvc style {controller}/{action}/{id}

Thx for your help!

  • 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-06-06T11:11:12+00:00Added an answer on June 6, 2026 at 11:11 am

    I found a solution for the first problem on this page:

    http://forums.asp.net/p/1589809/4028028.aspx

    An interesting sentence from this page:

    Please read the topic “Understanding the Outbound URL-Matching
    Algorithm” in Steve book.

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

Sidebar

Related Questions

As some background I prefer the flexibility and benefits that ASP.NET MVC gives me,
Background: I've wrote a small library that is able to create asp.net controls from
Here's a little background on my solution: ASP.Net MVC app Using Linq-to-SQL with table-per-hierarchy
I am trying to get my hands on MVC. I am from ASP.Net background.
I want to create in ASP.NET MVC 3 a link (in Ajax) with an
I'm tasked to create a web application. I'm currently using c# & asp.net (mvc
Is there anyway to create an ObjectSet from a DbSet ? Some background information:
Background: I work in a suite of ASP.NET applications that have several different modules.
-- background -- I have a customer intranet (ASP.NET / VB) thats instantiating an
I'm using a Canvas to create a Drawable with some background and some text.

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.