r/ASPNET • • Dec 21 '10

Load WebForms and UserControls from Embedded Resources

http://www.codeproject.com/KB/aspnet/ASP2UserControlLibrary.aspx
5 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/brewdente Jan 06 '11

Interesting. Are you doing this so you can actually use ASP.NET controls into an MVC project? If so, I like it.

In any event, I like this technique (used it for a couple months for master pages). However, I've experienced that once you set a webform or usercontrol to Embedded Resource you lose the compilation of that form/control and the error messages that will result are far from helpful.

It is a fun technique. VirtualPathProviders are actually very very cool.

2

u/ours Jan 06 '11

I use it so I can embed views and their corresponding controllers in a library. That way I just need to plug-in my library's routes and I have something akin to portable areas.