I have an application that is written on the top of ASP.NET Core 2.2 framework.
I have the following controller
public class TestController : Controller
{
[Route("some-parameter-3/{name}/{id:int}/{page:int?}", Name = "SomeRoute3Name")]
[Route("some-parameter-2/{name}/{id:int}/{page:int?}", Name = "SomeRoute2Name")]
[Route("some-parameter-1/{name}/{id:int}/{page:int?}", Name = "SomeRoute1Name")]
public ActionResult Act(ActVM viewModel)
{
// switch the logic based on the route name
return View(viewModel);
}
}
How can I get the route name in the action and/or the view?