Hi all, I'm kinna having a hard time referencing the assembly compiled by the Web Deployment Project.
see, I have a website project with a usercontrol and wanted to re use this in another website, so I compiled the project using web deployment project using this option
-> Create a separate assembly for each page and control output.
so I have these as a result after i built it.
the usercontrol has this default namespace "IAmAUserControl.UserControls"
You need to compile Custom User Control's HTML and source code into assembly. Please disable "Allow this precompiled site to be updatable" option in Web Deployment project. Then you can use just like using another Custom Usercontrol.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
jj011185
Member
23 Points
24 Posts
Referencing compiled assembly in Web deployment project
Oct 15, 2009 05:01 AM|LINK
Hi all, I'm kinna having a hard time referencing the assembly compiled by the Web Deployment Project.
see, I have a website project with a usercontrol and wanted to re use this in another website, so I compiled the project using web deployment project using this option
-> Create a separate assembly for each page and control output.
so I have these as a result after i built it.
the usercontrol has this default namespace "IAmAUserControl.UserControls"
now here are my questions.1. if i wanted to re-use the iamausercontrol.ascx control which files do i need to copy to the other web app's bin directory?
2. Do I still need to reference the IAmAUserControl.dll to my second web project?
3. How do I place the reference tags in the web.config file.
would it be like so?
<%@ Register Assembly="App_Web_iamausercontrol.ascx.6bb32623" Namespace="ASP.usercontrols_iamausercontrol_ascx" TagName="iamausercontrol" TagPrefix="mycontrol" %>
I can't seem to figure out the namespace to use.
Any help would be great. thanks.
Thomas Sun –...
All-Star
64969 Points
5621 Posts
Re: Referencing compiled assembly in Web deployment project
Oct 19, 2009 09:23 AM|LINK
Hi,
You need to compile Custom User Control's HTML and source code into assembly. Please disable "Allow this precompiled site to be updatable" option in Web Deployment project. Then you can use just like using another Custom Usercontrol.
For more information, see http://msdn.microsoft.com/en-us/magazine/cc163448.aspx (Especially in section: Creating Reusable User Controls).
Thanks.
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.