asp.net MapPageRoute order of precedence

Discussion in 'ASP .Net' started by moke, Jun 4, 2010.

  1. moke

    moke Guest

    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?
     
    moke, Jun 4, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christos TZOTZIOY Georgiou

    Introspection: expression evaluation order - precedence

    Christos TZOTZIOY Georgiou, Oct 24, 2003, in forum: Python
    Replies:
    0
    Views:
    303
    Christos TZOTZIOY Georgiou
    Oct 24, 2003
  2. Replies:
    26
    Views:
    664
    Mark McIntyre
    Jun 15, 2007
  3. vjay
    Replies:
    7
    Views:
    380
    Robin Kåveland Hansen
    Nov 27, 2007
  4. Replies:
    3
    Views:
    307
    Paavo Helde
    Mar 19, 2008
  5. Snorri
    Replies:
    1
    Views:
    279
    Victor Bazarov
    Mar 19, 2008
Loading...

Share This Page