Reputation: 7297
How can I embed a user control in a DLL?
Ideally, I would still be able to define the control's markup in an ascx file, but if I understand correctly you cannot embed template files into DLLs.
Upvotes: 0
Views: 382
Reputation: 99714
Take a look at this article
http://msdn.microsoft.com/en-us/library/aa479318.aspx
It is a little hackish, essentially you need to publish your website as a an unupdatable site. Then grab the web dll from the output and reuse that in your real web project.
I'd probably just go the route of creating Server Controls. These will be easier to maintain.
Upvotes: 2