public ActionResult CriteriaEditorTemplate(string contentProviderType) { var criteriaEditorType = AttributeService.GetCriteriaEditorTypeFromAttribute(contentProviderType); var contentProviderInstance = Activator.CreateInstance(criteriaEditorType); if (contentProviderInstance == null) { throw new FormatException(string.Format("Could not create instance of {0}", criteriaEditorType)); } return(PartialView(contentProviderInstance)); }