I have a problem when trying to generate url in the controller constructor
private BreadCrumbItem breadCrumbItem;
public SummaryController()
{
this.breadCrumbItem = new BreadCrumbItem { Title = "Sommaire", Url = Url.RouteUrl(new { controller = "Summary", action = "Index" }) };
}
The problem is in Url.RouteUrl
Why i can't access this in the controller? Any way to fix this ? Beacause otherwise i have to add the same code in all actions in this controller.
Thanks for help