I have a problem with routes in MVC.
routes.MapRoute(
name: "Default",
url: "{controller}/{id}",
defaults: new { controller = "Login", action = "Index", id = UrlParameter.Optional }
);
This route, for my pages, works (because I do not want it to have an Index in the URL). However, when I need to call a backend method, I need to pass the action.
How can I create the routes to work the way I need them? For backend method calls, I need to pass the action and for page URLs, I omit the action. And, by default, the action called in the page URLs is Index.