Package a UserControl in a dll

  • Thread starter Thread starter Carlo
  • Start date Start date
C

Carlo

I would like to package several usercontrols in a dll. Then use them in
another website. How do i accomplish this?

I tried to add a reference of the 2nd website to the dll of the first
website containing the usercontrols but i couldn't make it work.
 
Hello Carlo,

Could u describe what and how have u been doing this and what the errors
are ?

C> I would like to package several usercontrols in a dll. Then use them
C> in another website. How do i accomplish this?
C>
C> I tried to add a reference of the 2nd website to the dll of the first
C> website containing the usercontrols but i couldn't make it work.
C>
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
What i did was create a new asp.net web application ( VS2005 ). Hence i
create the the usercontrol and publish the site. On a second asp.net web
application i make a reference to the 1st web project dll, from which i try
to get an instance of the usercontrol. So far this has not worked because of
course the dll like this is not enough since one need the ascx files as
well. .

One can create a class library and make reference to System.Web but then how
does one create the UI ?

I did try to browse around for a solution but i found limited answers such
as "place it inside a dll", but i didn't find the steps on how to accomplish
this.
 
Hello Carlo,

I'd recommed to use Web Custom control, because in this case u can put it
inco GAC and share among apps
Read there http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx

Btw, all other resources are there http://groups.google.com/groups/search?q=asp.net+share+ascx+user+control

C> What i did was create a new asp.net web application ( VS2005 ). Hence
C> i create the the usercontrol and publish the site. On a second
C> asp.net web application i make a reference to the 1st web project
C> dll, from which i try to get an instance of the usercontrol. So far
C> this has not worked because of course the dll like this is not enough
C> since one need the ascx files as well. .
C>
C> One can create a class library and make reference to System.Web but
C> then how does one create the UI ?
C>
C> I did try to browse around for a solution but i found limited answers
C> such as "place it inside a dll", but i didn't find the steps on how
C> to accomplish this.
C>
C> C>
Hello Carlo,

Could u describe what and how have u been doing this and what the
errors are ?

C> I would like to package several usercontrols in a dll. Then use
them
C> in another website. How do i accomplish this?
C> C> I tried to add a reference of the 2nd website to the dll of the
first
C> website containing the usercontrols but i couldn't make it work.
C> ---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top