Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Jul 24, 2007 05:22 PM|LINK
I am trying to create a reusable user control.
I have created a VS2005 Solution, which has one Web Project. The .aspx file in the Web Project makes use of a new User control (.ascx) which 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.
Now, using the 'Build->Publish website' option, I have built separate '.dll' libraries for the .aspx file and the .ascx file into a folder named 'output'. These libraries have their names like App_Web_*.dll.
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, 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 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 add a reference to the User control's .dll to the Bin, it gives the same error.
Please help. (All I am trying to do is create a reusable user control).