Package a UserControl in a dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carlo

    Package a UserControl in a dll

    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.


  • Michael Nemtsev

    #2
    Re: Package a UserControl in a dll

    Hello Carlo,

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

    CI would like to package several usercontrols in a dll. Then use them
    Cin another website. How do i accomplish this?
    C>
    CI tried to add a reference of the 2nd website to the dll of the first
    Cwebsite 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


    Comment

    • Carlo

      #3
      Re: Package a UserControl in a dll

      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.

      "Michael Nemtsev" <nemtsev@msn.co mwrote in message
      news:1799a79b3b f9878c8d98ab17c 6ccd@msnews.mic rosoft.com...
      Hello Carlo,
      >
      Could u describe what and how have u been doing this and what the errors
      are ?
      >
      CI would like to package several usercontrols in a dll. Then use them
      Cin another website. How do i accomplish this?
      CCI tried to add a reference of the 2nd website to the dll of the
      first
      Cwebsite 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
      >
      >

      Comment

      • Michael Nemtsev

        #4
        Re: Package a UserControl in a dll

        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/archi...28/423888.aspx

        Btw, all other resources are there http://groups.google.com/groups/sear...x+user+control

        CWhat i did was create a new asp.net web application ( VS2005 ). Hence
        Ci create the the usercontrol and publish the site. On a second
        Casp.net web application i make a reference to the 1st web project
        Cdll, from which i try to get an instance of the usercontrol. So far
        Cthis has not worked because of course the dll like this is not enough
        Csince one need the ascx files as well. .
        C>
        COne can create a class library and make reference to System.Web but
        Cthen how does one create the UI ?
        C>
        CI did try to browse around for a solution but i found limited answers
        Csuch as "place it inside a dll", but i didn't find the steps on how
        Cto accomplish this.
        C>
        C"Michael Nemtsev" <nemtsev@msn.co mwrote in message
        Cnews:1799a79b3 bf9878c8d98ab17 c6ccd@msnews.mi crosoft.com...
        C>
        >Hello Carlo,
        >>
        >Could u describe what and how have u been doing this and what the
        >errors are ?
        >>
        >CI would like to package several usercontrols in a dll. Then use
        >them
        >Cin another website. How do i accomplish this?
        >CCI tried to add a reference of the 2nd website to the dll of the
        >first
        >Cwebsite 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


        Comment

        Working...