asp.net MapPageRoute order of precedence

M

moke

I am attempting to use the MapPageRoute feature in Visual Studio 2010 and
..NET Framework 4.0.

What I have noticed is that if I define a page route called "Default" like
below and the page Default.aspx exists in the project, then the route does
not work.

routes.MapPageRoute("Default", "default.aspx", "~/Page2.aspx");
routes.MapPageRoute("Test", "test.aspx", "~/Page2.aspx");

If I change the name of the Default.aspx in the project to Default_1.aspx,
then the route works fine.

There seems to be some order of precedence going on. Is there a way to make
my route definitions evaluated first so I don't have to rename my pages to
use the routing engine?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top