Raghvendr Singh

Raghvendr Singh

  • NA
  • 117
  • 127.7k

The view 'Index' or its master was not found in MVC2

Aug 5 2014 7:26 AM
Application Name is: MVCTestApplication
Controller is:HomeController.cs
Model is: SelectModel.cs
View is:..Home/AutherList.aspx

On Global.aspx code is as bellow

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

            routes.MapRoute(
                "AuthorList.aspx", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
        }


Answers (1)