2
Answers

How to generate url for the action with attribute routing

tri_inn

tri_inn

7y
248
1
public class HomeController : Controller
{
[Route("Users/about")]
[Route("Users/WhoareWe")]
[Route("Users/OurTeam")]
[Route("Users/aboutCompany")]
public ActionResult GotoAbout()
{
return View();
}
}
 
see i have many route defined for action GotoAbout(). now how could create route url in razor page programmatically when generate url for action like home/users/about ?
 
thanks
Answers (2)