Help: Not able to create a User Control library (.dll)http://forums.asp.net/t/1137529.aspx/1?Help+Not+able+to+create+a+User+Control+library+dll+Fri, 01 Feb 2008 06:34:48 -050011375291820835http://forums.asp.net/p/1137529/1820835.aspx/1?Help+Not+able+to+create+a+User+Control+library+dll+Help: Not able to create a User Control library (.dll) <p>I am trying to create a reusable user control.&nbsp;</p> <p>I have created a VS2005 Solution, which has&nbsp;one Web Project. The .aspx file in the Web Project makes use of a new User control (.ascx) which&nbsp;is inside a sub-folder of the Web project. When I run the solution, the web project works as expected and the .aspx renders the user control fine.</p> <p>Now, using the 'Build-&gt;Publish website' option, I have built separate '.dll' libraries for the .aspx file and the .ascx file into a folder named 'output'. These&nbsp;libraries have their names&nbsp;like App_Web_*.dll.</p> <p>I want to reuse the user control in another web application. So, I tried to reference the .dll that was created above for the user control into the Bin folder of my new web application. After doing so,&nbsp;I am not sure what should be the namespace that I should include in the 'using' statement in my code behind for the new web app page. I opened the user control's&nbsp;App_Web_*.dll using the ILDASM utility and saw my user control's class name in it. But when I try to create an instance of the user contol class in the code behind, it is asking for a missing assembly reference. Eventhough I&nbsp;add a reference to the User control's .dll to the Bin, it gives the same error.</p> <p>Please help. (All I am trying to do is create a reusable user control).</p> <p>Thanks.</p> 2007-07-24T17:22:20-04:001821895http://forums.asp.net/p/1137529/1821895.aspx/1?Re+Help+Not+able+to+create+a+User+Control+library+dll+Re: Help: Not able to create a User Control library (.dll) <p>You cannot create a User Control which can be used out of a DLL directly. You have to copy and paste the .ASCX file to the new project. You can use CompositeControls to create a distributable control.</p> 2007-07-25T05:54:15-04:001822952http://forums.asp.net/p/1137529/1822952.aspx/1?Re+Help+Not+able+to+create+a+User+Control+library+dll+Re: Help: Not able to create a User Control library (.dll) <p>Sujit</p> <p>Please refer to the below posts, I have successfully created a DLL out of a user control and now it is redistributable. This is an easier path compared to developing a custom server control.</p> <p><a href="http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx">http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx</a>&nbsp;and&nbsp;&nbsp;<a href="http://blogs.msdn.com/davidebb/archive/2005/10/30/487160.aspx"><font face="Calibri" size="3">http://blogs.msdn.com/davidebb/archive/2005/10/30/487160.aspx</font></a>&nbsp;</p> <p>Thank you&nbsp;for your interest!</p> <p>&nbsp;</p> 2007-07-25T15:43:57-04:001824315http://forums.asp.net/p/1137529/1824315.aspx/1?Re+Help+Not+able+to+create+a+User+Control+library+dll+Re: Help: Not able to create a User Control library (.dll) <p>I wasn't aware that this is possible. Many thanks.</p> 2007-07-26T06:23:06-04:002147111http://forums.asp.net/p/1137529/2147111.aspx/1?Re+Help+Not+able+to+create+a+User+Control+library+dll+Re: Help: Not able to create a User Control library (.dll) <p>Hi,</p> <p>&nbsp; I am also facing in creating user control library (dll). I have created an asp.net web application&nbsp;&nbsp;with only one usercontrol, the application name is &quot;TestControl&quot; and no other projects (like class library) are connected. </p> <p>When I pubish the project the dll is App_web_*.dll.</p> <p>Why is it so?</p> <p>&nbsp;</p> <p>Thanks</p> <p>Shobha</p> 2008-02-01T06:34:48-05:00