Help with compiling user control into a DLL

Posted on 2008-11-19
Medium Priority
Last Modified: 2012-05-05
I've been using a web user control in one of my projects to output a list of data.  I'm now trying to put this into a DLL so i can just move the dll file around from project to project instead of the .ascx and .ascs.cs files.  But I'm running into some difficulty.  When I get it into a DLL and reference it in my test project I get an error that object isn't found.  Apparently what's happening is that whatever is in my .ascx file it's not outputing.  So if I do a simple test and put the "Hello World" in my .ascx file and compile it, it doesn't show up.  If I do a response.write in my .ascx.cs file then it shows up.  Can someone help me here?  In my .ascx file I have HTML and in the .ascx.cs file I connect to the DB and pull data and output it.
Question by:rshafakian
  • 2

Author Comment

ID: 22997615
BTW I went through this tutorial http://msdn.microsoft.com/en-us/library/aa479318.aspx and still could not get it to work.  I created a simple user control that says Hello in the .ascx file and if I test it as a user control then it works.  But once I compile it and reference the DLL in my test site it doesn't spit out the Hello.  

Accepted Solution

rshafakian earned 0 total points
ID: 22999300
Okay, well I actually figured this out on my own.  But now I have another question.  I built this DLL by opening creating an ASP.NET Web Site.  I want to know how I can change the name of the output DLL.  I know if it was a project file I could go in and tell it what name to output, but for this it gives me a weird name.  Any suggestions?

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question