Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > User Webcontrols across several applications?

Reply
Thread Tools

User Webcontrols across several applications?

 
 
Axel Dahmen
Guest
Posts: n/a
 
      02-23-2004
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


 
Reply With Quote
 
 
 
 
Sarmad Aljazrawi
Guest
Posts: n/a
 
      02-23-2004
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
>
>



 
Reply With Quote
 
 
 
 
Axel Dahmen
Guest
Posts: n/a
 
      02-23-2004
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
> >
> >

>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      02-23-2004
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/JimRo...rControls.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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RDOC: several related modules in several C files Victor \Zverok\ Shepelev Ruby 3 03-16-2007 04:15 PM
Trigger event into several webcontrols from main page ? jesper_lofgren@yahoo.se ASP .Net 2 12-28-2005 08:44 PM
Object reference not set to an instance of an object. System.Web.UI.WebControls.ListItemCollection.SaveViewState() System.Web.UI.WebControls.ListControl.SaveViewState() Brano ASP .Net 3 11-08-2005 12:29 PM
How to keep session information across several appliations? Terry Olsen ASP .Net 2 09-29-2005 03:07 PM
Re: DHCP snooping across several switches Victor Sudakov Cisco 3 09-25-2005 04:44 AM



Advertisments