User Webcontrols across several applications?

Discussion in 'ASP .Net Web Controls' started by Axel Dahmen, Feb 23, 2004.

  1. Axel Dahmen

    Axel Dahmen Guest

    Hi,

    I've created several complex User Webcontrols (.ascx) which I now want to
    re-use in another web application. But by definition, this is not possible.
    If I now start with Copy&Paste, I'll always have to do my changes twice.
    (Nonetheless it seems quite archaic to me.)

    Is there perhaps a trick or a workaround? I don't want to re-engineer my
    User Webcontrols into User-defined Webserver Controls.

    TIA,
    Axel Dahmen
     
    Axel Dahmen, Feb 23, 2004
    #1
    1. Advertising

  2. Depending on how complex your user control are, i'd change them to custom
    controls/server controls which then i'd be able to add it to the toolbox and
    re-use it to many applications without having to copy and paste.



    --
    Sarmad Aljazrawi
    B.Sc. Computer Science, MSDBA, MCP
    www.aljazrawi.net


    "Axel Dahmen" <> wrote in message
    news:Oesuc9f%...
    > Hi,
    >
    > I've created several complex User Webcontrols (.ascx) which I now want to
    > re-use in another web application. But by definition, this is not

    possible.
    > If I now start with Copy&Paste, I'll always have to do my changes twice.
    > (Nonetheless it seems quite archaic to me.)
    >
    > Is there perhaps a trick or a workaround? I don't want to re-engineer my
    > User Webcontrols into User-defined Webserver Controls.
    >
    > TIA,
    > Axel Dahmen
    >
    >
     
    Sarmad Aljazrawi, Feb 23, 2004
    #2
    1. Advertising

  3. Axel Dahmen

    Axel Dahmen Guest

    thanks. Unfortunately it's not that easy. Some of them have different
    display modes others contain up to 5 asp:Repeater controls. Doing all the
    rendering manually would be no fun...


    ------------
    "Sarmad Aljazrawi" <anonymous[shylme]@discussions.microsoft.com> schrieb im
    Newsbeitrag news:O1t1iNk#...
    > Depending on how complex your user control are, i'd change them to custom
    > controls/server controls which then i'd be able to add it to the toolbox

    and
    > re-use it to many applications without having to copy and paste.
    >
    >
    >
    > --
    > Sarmad Aljazrawi
    > B.Sc. Computer Science, MSDBA, MCP
    > www.aljazrawi.net
    >
    >
    > "Axel Dahmen" <> wrote in message
    > news:Oesuc9f%...
    > > Hi,
    > >
    > > I've created several complex User Webcontrols (.ascx) which I now want

    to
    > > re-use in another web application. But by definition, this is not

    > possible.
    > > If I now start with Copy&Paste, I'll always have to do my changes twice.
    > > (Nonetheless it seems quite archaic to me.)
    > >
    > > Is there perhaps a trick or a workaround? I don't want to re-engineer my
    > > User Webcontrols into User-defined Webserver Controls.
    > >
    > > TIA,
    > > Axel Dahmen
    > >
    > >

    >
    >
     
    Axel Dahmen, Feb 23, 2004
    #3
  4. hi Axel,
    The only way to share the user control between applications is to put a
    separate copy in each application, which takes more maintenance if you make
    changes to the control. This is one of the main differences btw User
    Controls and Custom web controls. With Custom Web Controls you can install a
    single copy of in the global assembly cache and share it between
    applications, which makes maintenance easier.

    However there is a small work around with limitations that Jim ross
    showcases in the following article. See if that is what you want.

    http://authors.aspalliance.com/JimRoss/Articles/ShareUserControls.aspx

    On the other hand if you changed your mind about using a user control and
    wanted a custom web control instead then know that its not as hard and as
    much work as you think once you get a hang of it and know what you are
    doing.

    All roads lead to rome ;P


    "Axel Dahmen" <> wrote in message
    news:%23iKjkkl%...
    > thanks. Unfortunately it's not that easy. Some of them have different
    > display modes others contain up to 5 asp:Repeater controls. Doing all the
    > rendering manually would be no fun...
    >
    >
    > ------------
    > "Sarmad Aljazrawi" <anonymous[shylme]@discussions.microsoft.com> schrieb

    im
    > Newsbeitrag news:O1t1iNk#...
    > > Depending on how complex your user control are, i'd change them to

    custom
    > > controls/server controls which then i'd be able to add it to the toolbox

    > and
    > > re-use it to many applications without having to copy and paste.
    > >
    > >
    > >
    > > --
    > > Sarmad Aljazrawi
    > > B.Sc. Computer Science, MSDBA, MCP
    > > www.aljazrawi.net
    > >
    > >
    > > "Axel Dahmen" <> wrote in message
    > > news:Oesuc9f%...
    > > > Hi,
    > > >
    > > > I've created several complex User Webcontrols (.ascx) which I now want

    > to
    > > > re-use in another web application. But by definition, this is not

    > > possible.
    > > > If I now start with Copy&Paste, I'll always have to do my changes

    twice.
    > > > (Nonetheless it seems quite archaic to me.)
    > > >
    > > > Is there perhaps a trick or a workaround? I don't want to re-engineer

    my
    > > > User Webcontrols into User-defined Webserver Controls.
    > > >
    > > > TIA,
    > > > Axel Dahmen
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alessandro Zifiglio, Feb 23, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mg
    Replies:
    1
    Views:
    470
    Hermit Dave
    Dec 18, 2003
  2. David
    Replies:
    0
    Views:
    396
    David
    May 15, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: using user controls across web applications

    Phil Winstanley [Microsoft MVP ASP.NET], May 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    404
    Phil Winstanley [Microsoft MVP ASP.NET]
    May 15, 2004
  4. Chad A. Beckner

    Share User Control Across Applications - How?

    Chad A. Beckner, Jun 7, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    621
    John Saunders
    Jun 7, 2004
  5. Ily
    Replies:
    1
    Views:
    282
    John Timney \(MVP\)
    Nov 21, 2006
Loading...

Share This Page