Hi,
In the following code when i access "http://localhost:1904/Customer/New" it gives me an error as resource cannot be found. but if i comment all routs apart "DataEntry" it lands me on the specific page. Please help me out of this problem.
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Home",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "GotoHome", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Home1",
url: "{controller}/{action}/{id}",
defaults: new { controller = "", action = "GotoHome", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "DataEntry",
url: "Customer/New",
defaults: new { controller = "NewCustomerDataEntry", action = "NewCustomerDataEntry", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}