Can Autofac inject dependencies into layout view files?
问题 I'm trying to inject a dependency into the shared layout view page to avoid having to do it in every view that uses the layout. I've followed the guidance in the wiki for injecting dependencies into views, but the property is always null. Can Autofac inject properties into a custom view page that is a layout file? Here's my setup. CustomViewPage namespace MyApp { using System.Web.Mvc; public abstract class CustomViewPage : WebViewPage { public IHelper Helper { get; set; } } } ~/Views/Shared/