Help with compiling user control into a DLL

Posted on 2008-11-19
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

    Author Comment

    BTW I went through this tutorial 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

    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

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now