5 February 2014

How to set default page in mvc

public static void RegisterRoutes(RouteCollection routes)
{
routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );
}

No comments:

Post a Comment