mercredi 20 janvier 2016

Changing the home page is not working

In my project the initial route config was like below

 public static void RegisterRoutes(RouteCollection routes)
  {
   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
   routes.MapRoute(
   name: "Default",
  url: "{controller}/{action}/{id}",
 defaults: new { controller = "Home", action = "Login", id = UrlParameter.Optional }
            );
        }

Now I changed to

 public static void RegisterRoutes(RouteCollection routes)
  {
   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
   routes.MapRoute(
   name: "Default",
  url: "{controller}/{action}/{id}",
 defaults: new { controller = "Pro123", action = "Index", id = UrlParameter.Optional }
            );
        }

Then I rebuild the solution and run it again @ local system. Still it is going to Login view of the Home controller. Am I missing anything?

Aucun commentaire:

Enregistrer un commentaire