Is it possible to somehow leverage the dependency injection in Asp.net MVC 3 (using the Forms ViewEngine) to inject UserControls from another library? I am already using MEF to load some other stuff into my MvcApplication.
I need this because I want to build a system with an expandable type system. I want the type vendor to be able to inject custom controls for the provided type. I already have a custom MetadataProvider that knows how to handle the provided types (it sets the ModelMetadata.TemplateHint property).
The question is where can I plug in with MEF, so that the TemplateHint gets properly handled, and a custom control is dispalyed upon caling Html.EditorForModel