Reputation: 131
i added the following routes in my routetable.
routes.MapRoute(
"Default",
"{controller}.aspx/{action}/{id}",
new { action = "Index", id = "" }
);
routes.MapRoute(
"Root",
"",
new { controller = "Home", action = "Index", id = "" }
);
routes.MapRoute(
"Home",
"Index",
new { controller = "Home", action = "Index", id = "" }
);
and i can navigate to the home page (manually). But the application will not navigate on app start.
Any ideas? Thanks.
Upvotes: 0
Views: 377
Reputation: 740
this code block would work just changed router name
routes.MapRoute(
".netx",
"{controller}.aspx/{action}/{id}",
new
{
action = "Index",
id = ""
});
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
and please be sure on the application start page
Upvotes: 1