Set default page in Asp.Net MVC

In the project ->  App_Start ->  RouteConfig.cs 


public static void RegisterRoutes(RouteCollection routes)
{
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                   defaults: new { controller = "Home", action = "Register" id = UrlParameter.Optional }
            );
}

No comments:

Post a Comment