[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

User Webcontrols across several applications?

Axel Dahmen

2/23/2004 11:23:00 AM

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


3 Answers

Sarmad Aljazrawi

2/23/2004 7:30:00 PM

0

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" <NO_SPAM@NoOneKnows.de> wrote in message
news:Oesuc9f%23DHA.3816@tk2msftngp13.phx.gbl...
> 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

2/23/2004 10:06:00 PM

0

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#DHA.1392@tk2msftngp13.phx.gbl...
> 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" <NO_SPAM@NoOneKnows.de> wrote in message
> news:Oesuc9f%23DHA.3816@tk2msftngp13.phx.gbl...
> > 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

2/23/2004 10:53:00 PM

0

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/ShareUserCon...

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" <NO_SPAM@NoOneKnows.de> wrote in message
news:%23iKjkkl%23DHA.1632@TK2MSFTNGP12.phx.gbl...
> 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#DHA.1392@tk2msftngp13.phx.gbl...
> > 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" <NO_SPAM@NoOneKnows.de> wrote in message
> > news:Oesuc9f%23DHA.3816@tk2msftngp13.phx.gbl...
> > > 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
> > >
> > >
> >
> >
>
>