after debbuging i am getting following url of my webproject:
http://localhost:54594/Home/Home /Home-Controller/Home-Action
http://localhost:54594/AboutUs/AboutUs /AboutUs-Controller/AboutUs-Action
http://localhost:54594/Products/Products /Products-Controller/Products-Action
In my global.asax
i have:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Home", id = UrlParameter.Optional } // Parameter defaults
);
}
I want to show my URLs like this:
http://localhost:54594/Home /Home action or controller
http://localhost:54594/AboutUs /AboutUs action or controller
http://localhost:54594/Products /Products action or controller
With Home.aspx
this works alright because it's my default url, how can I do same with the rest of urls?