Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

Wanted to create routes as shown in following .

1) www.abc.com/search maps to https://www.abc.com/abc/Search.aspx.

2) www.abc.com/information maps https://www.abc.com/abc/Information.aspx

3) www.abc.com/poplist maps https://www.abc.com/abc/List.aspx?item=pop.

I've gone through friendlyURLS but it doesn't serve the purpose
and gone through following link:

http://msdn.microsoft.com/en-us/library/cc668177(v=vs.100).aspx

And tried following:

RegisterRoutes(RouteTable.Routes);

void RegisterRoutes(RouteCollection routes)
{


RouteTable.Routes.MapPageRoute("SearchRoute",
"{Name}",
"~/abc/Search.aspx");

RouteTable.Routes.MapPageRoute("InfoRoute",
"{Info}",
"~/abc/Information.aspx");

RouteTable.Routes.MapPageRoute("SearchRoute",
"{List}",
"~/abc/List.aspx");
}

It is heading to search page only.
Can you please shed some light what am I missing?

Best Regards,
Damodar
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900