views:

20

answers:

0

I have one page "~/Admin/Teams/Edit.aspx". This page has 2 function "Insert/Edit". I have two routes defined:

        routes.MapPageRoute("teams-new",
                            "team-new/{league}",
                            "~/Admin/Teams/Edit.aspx");

        routes.MapPageRoute("teams-edit",
                            "team/{teamName}/{team}",
                            "~/Admin/Teams/Edit.aspx");

However, it only recognizes the parameters in the first one defined. For example, when I use:

Page.GetRouteUrl("teams-edit", new { teamName = "blah", team = 35 });

It recognizes "team" as "league". I think it has something to do with using "~/Admin/Teams/Edit.aspx" for multiple routes and it just ignores the second one.