I have defined MVC controller in my MVC web application. I have 5 different action names defined in the controller. All actions are doing different things.
What i want to do is defined a common MVC route in global.asax instead of 5 different MVC routes. One route i have defined like this in global.asax file.
routes.MapRoute(
"Action1/1", // Route name
"xyz/check-data1", // URL with parameters
new { controller = "CheckDate", action = "Check1" } // Parameter defaults
);
I need 5 different routes here because these 5 different routes will be called 5 hyperlinks in my web page.
I do not want to do copy and paste above route and create 5 different routes. For e.g. one more route i can defined like this as below.
routes.MapRoute(
"Action2/2", // Route name
"xyz/check-data2", // URL with parameters
new { controller = "CheckDate", action = "Check2" } // Parameter defaults
);
Please suggest me on this.