Can you share user controls between different sites/projects? If so how?
I have a traffic control that I made for one site that I would like to use in another without cut and paste. I tried adding it as a component be referencing the dll from the original site but it said there were no components in the assembly. I can reference it as a normal reference but then what do I drag over to put it on a web form?i think all controls are private assemblies aren't they as when you add them to your project the .dll get's copied to that apps bin directory.
(i think that's what i read in my book anyway!)
Nick
I think so for the most part but the User Controls I'm talking about are the asxc ones that are part of the project. I guess its just not an option to share them unless you convert them to Web Custom Controls, bummer. It is indeed in the other project's dll which I referenced I just didn't find a way to effectively stick it on a page. I tried manually adding it but it didn't like the full namespace in the register part at the top.
not an option to share them unless you convert them to Web Custom Controls
Just finished reading that section in a book. The statement I quoted is correct.
You can't use dll's across application boundies in IIS, (at least by default, I haven't found a way to over ride this behavior yet either).
The only way I know is to create a Web Custom Control, register it in the GAC, and add a reference to it.
Thanks!
Edneeis,
If you want, I can convert it to a server control for ya.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment