Click here to Skip to main content
16,017,638 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
i have this url

"http://localhost:1549/Store/Pages/Home.aspx"

i want remove "/Store/Pages" and ".aspx" extention in url for any page
such as
"http://localhost:1549/Store/Product/Home.aspx"
convert to
"http://localhost:1549/Product"

i try this code
C#
public class Global : System.Web.HttpApplication
{

     void Application_Start(object sender, EventArgs e)
    {
        RegisterRoutes(RouteTable.Routes);

    }

    public static void RegisterRoutes(RouteCollection routeCollection)
    {
        routeCollection.MapPageRoute("",
     "/Store/Pages",
     "~/.aspx");
    }
}

but not work
please help me
Posted
Updated 19-Aug-13 1:16am
v2

1 solution

Have a look at the Below URL :

URL Routing with ASP.NET 4.0[^]
 
Share this answer
 
Comments
SadeqHatami 19-Aug-13 9:44am    
thank's
but is not solved my problem,
i want remove /Store/Pages in any page,such az fist site page

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