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
- );
- }
- }
- }

Salman BegRank #284 · 8.8K reputationPosted Feb 7, 2020, 3:53 AM EST
Siddharth GajbhiyeRank #376 · 6.7K reputationPosted Feb 8, 2020, 9:54 PM EST