Have you seen the open source solution MvcBreadCrumbs ? There are several ways to do this using the Nuget package. You can use attributes in controller methods, for example:
[BreadCrumb(Label="Widget")] public ActionResult ...
or optionally add a call to the static method to override the label if it is data dependent:
[BreadCrumb(Label="Widget")] public ActionResult Get(int id) { [make db call] BreadCrumb.SetLabel(db.ItemDescription); return view(dbModel); }
source share