0
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 don’t want you 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 to? For backend method calls, I need to pass the action and page URL, omit the action. And by default, the action called in page Urls is Index.