Whilst I totally agree with @Darin's response, here is a relatively simple way to do what you're asking, using ViewData.
Regarding the actual logic for enumerating all controllers. I won't add that here as this is a reasonable way of doing it, that I probably couldn't improve upon.
You could do something using ViewData to store all of your controllers and actions dynamically from OnActionExecuting. You'd have to create a new controller from which all of your other controllers would inherit.
So, for example, with your ProductController:
public class ProductController : MyCustomController
{
...
}
...
public class MyCustomController : Controller
{
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
base.OnActionExecuting(filterContext);
//Some logic (not written) to reflect each of the controllers and actions. Probably something utilising IGrouping.
var controllersActions = GetControllersActions();
//Drop your collection into the ControllersActions.
filterContext.Controller.ViewData.Add("ControllersActions", controllersActions);
}
}
In your master page...
<% var controllersActions = ViewData["ControllersActions"]; %>
... outputting your controllers/actions ...