473,320 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Reusable controls...missing something?

Hello...

We are in the process of evaluating a migration strategy to VS2005 and
ASP.NET 2.0 from .NET 1.1.

In our existing .NET 1.1 applications, we have several controls
(ASCX's) that provide stock content to several websites. We want to
persist that idea into our newer and/or migrated applications, eg build
a control to contain the text (and some small javascript code) in one
place, then put that control in a library, then just pull that control
out on to our pages on the various websites.

What we're seeing, however, leads us to believe that the best we can
really hope for is to create such controls repetitively among each
website that might use them. Master Pages seemed like the next logical
step, but again, our observation leads us to believe they're
constrained to a single site. We want to be able to reuse code across
*multiple* sites.

The notion of having to maintain copies of the same code across
multiple sites seems to defeat the whole purpose of having libraries of
nice, reusable code; if the text on these stock controls has to change,
we have to change it for each website that uses it. Ugh. That doesn't
make any sense to us, so I have to assume I'm just being dense about
the intended process.

What is the proper approach, if one exists?

Thanks,
intrepid

Aug 22 '06 #1
3 1260
hi intrepid,
you certainly shouldn't have to duplicate code, in the scenario you have
described.
if you use master pages, you could very simply drop the control from your
library onto the master page. that seems so simple it makes me wonder if i
am missing the point of your question? the 'child' pages can access any
controls on their master page and modify them accordingly.

if you don't want to use master pages you could use the same model as you
use in 1.1, just drop the control onto each page you want to.

i found the migration quite a big deal myself, with plenty of "why did they
do it this way!!!" questions, but you get used to it and can see the
benefits after you are familiar with the new techniques.

tim
Aug 22 '06 #2
If you use the Web Application Projects add-in, you can compile all your ASCX
usercontrols' codebehind into a single assembly. Then, to use these in a
separate web site, all you need to do is drop that assembly for your controls
into the /bin folder and copy the .ASCX files there.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"in*********@hotmail.com" wrote:
Hello...

We are in the process of evaluating a migration strategy to VS2005 and
ASP.NET 2.0 from .NET 1.1.

In our existing .NET 1.1 applications, we have several controls
(ASCX's) that provide stock content to several websites. We want to
persist that idea into our newer and/or migrated applications, eg build
a control to contain the text (and some small javascript code) in one
place, then put that control in a library, then just pull that control
out on to our pages on the various websites.

What we're seeing, however, leads us to believe that the best we can
really hope for is to create such controls repetitively among each
website that might use them. Master Pages seemed like the next logical
step, but again, our observation leads us to believe they're
constrained to a single site. We want to be able to reuse code across
*multiple* sites.

The notion of having to maintain copies of the same code across
multiple sites seems to defeat the whole purpose of having libraries of
nice, reusable code; if the text on these stock controls has to change,
we have to change it for each website that uses it. Ugh. That doesn't
make any sense to us, so I have to assume I'm just being dense about
the intended process.

What is the proper approach, if one exists?

Thanks,
intrepid

Aug 22 '06 #3
Peter:

*That* sounds like a great suggestion, Peter. We'll give that a try. It
sounds exactly like what we want to do.

-Intrepid

Peter wrote:
If you use the Web Application Projects add-in, you can compile all your ASCX
usercontrols' codebehind into a single assembly. Then, to use these in a
separate web site, all you need to do is drop that assembly for your controls
into the /bin folder and copy the .ASCX files there.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"in*********@hotmail.com" wrote:
Hello...

We are in the process of evaluating a migration strategy to VS2005 and
ASP.NET 2.0 from .NET 1.1.

In our existing .NET 1.1 applications, we have several controls
(ASCX's) that provide stock content to several websites. We want to
persist that idea into our newer and/or migrated applications, eg build
a control to contain the text (and some small javascript code) in one
place, then put that control in a library, then just pull that control
out on to our pages on the various websites.

What we're seeing, however, leads us to believe that the best we can
really hope for is to create such controls repetitively among each
website that might use them. Master Pages seemed like the next logical
step, but again, our observation leads us to believe they're
constrained to a single site. We want to be able to reuse code across
*multiple* sites.

The notion of having to maintain copies of the same code across
multiple sites seems to defeat the whole purpose of having libraries of
nice, reusable code; if the text on these stock controls has to change,
we have to change it for each website that uses it. Ugh. That doesn't
make any sense to us, so I have to assume I'm just being dense about
the intended process.

What is the proper approach, if one exists?

Thanks,
intrepid
Aug 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John | last post by:
Hi, I have a data driven application which has some generalized components. So, for reuse, I am building the components so they can be reused in other projects ... it takes almost no extra...
3
by: Axter | last post by:
I'm wondering about the practical use of dynamic_cast in reusable or generic code. I'm currently working on a smart pointer that can be used on vector and other STL containers. See following...
9
by: Bijoy Naick | last post by:
In my Visual Studio solution, I have 2 projects.. One project implements a newsletter object, the other a file upload user control. When I compile the solution, each project generates its own DLL....
5
by: Guenter | last post by:
In a blog from Scott Guthrie (http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx) I found a sample to build a UserControl Library inside one ASP.NET project and then deploy it to other...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
4
by: Michael | last post by:
Hi everyone, I just used the upgrade wizard to upgrade a project of mine. One of the main forms I have has over 200 controls on the form, Uses some tab controls. Now, I have a main tab control...
1
by: seanmayhew | last post by:
Ive got a page with all formatting and layout done with css no tables...It has approximately 60+ controls. All of the controls are in nested panels so i have a something like 6 primary panels and...
1
by: Ramesh | last post by:
Hello all, I have a form in which I'm trying to load a user control depending on some user choice, and my control's events are not firing properly. Here's a completely stripped down repro of the...
2
by: freedom9ner | last post by:
Hello, I'm investigating how HTML can be componentized and reusable. Remember Microsoft's SCRIPTLET object (TYPE="text/x-scriptlet")? I thought this was a great invention. But other browsers do not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.