protected void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
RegisterRoutes(RouteTable.Routes);
}
static void RegisterRoutes(RouteCollection routes)
{
//routes.MapPageRoute("Uniquename", "Name to shown on Adddress bar AND for redirecting", "Physical Path to the page");
routes.MapPageRoute("Home", "StoreFrontPage", "~/BestSeller.aspx");
routes.MapPageRoute("index", "MainPage", "~/index.aspx");
routes.MapPageRoute("ProductDetails", "DetailOfProduct", "~/ProductDetails.aspx");
}
Above codes helps me change the name of the url when i use "href" or "response.redirect" so when i open the first webpage (the starting page) i could not hide the url. i do not want users to see the name of the webpage.aspx file. thanks for any advices/help!