How to import ASP.NET user controls with MEF?

Aug 2, 2011 at 1:41 PM

Hi all,

I'm interested in MEF with respect to ASP.NET applications as I am building a CMS. However, I can’t figure out if I want to use MEF with custom server controls or custom user controls.

As I understand it, when using custom server controls, you have to write all the HTML in the control yourself with help from the HTMLHelper Class. There is no way to take advantage of existing build in server controls like asp:menu?

I think a better solution for me is to use user controls. My question to you is now: if I have created a user control, how do I import it (both markup and codebehind) with MEF? Should it be compiled in a special way?

Thanks

/Phecdaret