Hi Mates
I want to have two unique routes one being normal controller = Home, action = "Index"... . Is it possible to have a unique route within for example dashboard so that files dont get confused when loaded from the browser. My logic is as below;
- namespace ContentManagementSystem
- {
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } // I already have this working fine
- defaults: new { controller = "Dashbaord", action = "_Index", id = UrlParameter.Optional // I want to have seperate, but unique route for this controller for actionResult
- );
- }
- }
- }
Siddharth GajbhiyePosted Feb 9, 2020, 2:54 AM
Salman BegPosted Feb 7, 2020, 8:53 AM