473,398 Members | 2,389 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,398 software developers and data experts.

Sharing UserControls between different sites

Hi

I have some common UserControls i want to share between to sites (on the
same mashine but on diffrent virtual paths).

right now i have on solution file with aprox 10 projects. 2 of these is
webprojetcs wich need to shere some common userControls. Optimally i want a
class libarary project wich contains the controls so i could import the DLL
and use the controls. But that of course doesnt work.

How should i do this? Sinve i only can create UserControls in a webProejct,
and dont want to create a "dummy" webProject from wich I can share
controles. Neither do i want one project to be a "master" project, because
there are....equal.

Any comments?. I imagine the also could be some security issues if i had to
share between so production projects.

Thank in regards
Nov 19 '05 #1
4 1627
Anders K. Jacobsen [DK] wrote:
Hi

I have some common UserControls i want to share between to sites (on the
same mashine but on diffrent virtual paths).

right now i have on solution file with aprox 10 projects. 2 of these is
webprojetcs wich need to shere some common userControls. Optimally i want a
class libarary project wich contains the controls so i could import the DLL
and use the controls. But that of course doesnt work.

How should i do this? Sinve i only can create UserControls in a webProejct,
and dont want to create a "dummy" webProject from wich I can share
controles. Neither do i want one project to be a "master" project, because
there are....equal.

Any comments?. I imagine the also could be some security issues if i had to
share between so production projects.

Thank in regards

Don't waste your time doing that.
Basically copy paste the same user controls in both paths.
Files are not several MB's. And the solution that you are thinking will
cause performance problems. You don't need to do it when you don't have to.
--

SevDer
http://www.sevder.com
Nov 19 '05 #2
> Don't waste your time doing that.
Basically copy paste the same user controls in both paths.
Files are not several MB's. And the solution that you are thinking will
cause performance problems. You don't need to do it when you don't have
to.


You might be right in your assumption. Guess I strictly don´t need this
generallity.

Anders
Nov 19 '05 #3
Please check this
http://authors.aspalliance.com/steve.../netreuse1.asp

--
Saludos,
Eugenio Serrano
NDSoft Consultoria y Desarrollo
MS MVP ASP.Net
Voluntario Ineta Latam (www.ineta.org/latam)
"Anders K. Jacobsen [DK]" <no**@at.all> escribió en el mensaje
news:ul**************@TK2MSFTNGP14.phx.gbl...
Hi

I have some common UserControls i want to share between to sites (on the
same mashine but on diffrent virtual paths).

right now i have on solution file with aprox 10 projects. 2 of these is
webprojetcs wich need to shere some common userControls. Optimally i want a class libarary project wich contains the controls so i could import the DLL and use the controls. But that of course doesnt work.

How should i do this? Sinve i only can create UserControls in a webProejct, and dont want to create a "dummy" webProject from wich I can share
controles. Neither do i want one project to be a "master" project, because
there are....equal.

Any comments?. I imagine the also could be some security issues if i had to share between so production projects.

Thank in regards

Nov 19 '05 #4
Hi,

The recommended method of share a control between multiple web sites is to
create a custom web control and deploy it to the GAC. Then you can
reference it from multiple projects/sites.

While this is not recommended it may get you past your issue.

Site 1:
Store your usercontrols (ascx) in a directory separate from the other
source.

e.g:

Site 1
|-bin
|-images
|-userControls
|- *.aspx

Then add a virtual directory under the root of Site 2 Pointing to the
userControls directory of Site 1

e.g

Site 2
|-bin
|-images
|-UserControls (Virtual Directory)
|- *.aspx

This would in allow you to reference your user controls across sites....but
again I do not recommend it.

Bryce

"Anders K. Jacobsen [DK]" <no**@at.all> wrote in message
news:ul**************@TK2MSFTNGP14.phx.gbl...
Hi

I have some common UserControls i want to share between to sites (on the
same mashine but on diffrent virtual paths).

right now i have on solution file with aprox 10 projects. 2 of these is
webprojetcs wich need to shere some common userControls. Optimally i want a class libarary project wich contains the controls so i could import the DLL and use the controls. But that of course doesnt work.

How should i do this? Sinve i only can create UserControls in a webProejct, and dont want to create a "dummy" webProject from wich I can share
controles. Neither do i want one project to be a "master" project, because
there are....equal.

Any comments?. I imagine the also could be some security issues if i had to share between so production projects.

Thank in regards

Nov 19 '05 #5

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

Similar topics

1
by: CanardWC | last post by:
Hello, Just a little problem. I want to share a shopping cart between 2 php sites for example foo and fii. There'is no login / password solution wanted, so i must use cookie and session. If...
5
by: BPearson | last post by:
Hello I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to...
2
by: Ajeet YS | last post by:
Hello, We need to share the same user controls among many developers in the same project. How do we achieve this? We have looked into using Custom controls, but they have a very high development...
3
by: darrel | last post by:
Is it practical? I have a site we've been working on where a lot of the objects on the page are usercontrols...the header, the footer, navigation, etc. I need to make a stand-alone mini-site...
5
by: Nils Hedström | last post by:
Sorry about my last post. There seems to be a bug in my newsreader-software. My company (companyA) has bought companyB. The website of companyA is www.companyA.com and comanyB's website is...
11
by: Greg Smalter | last post by:
I'm converting some ASP web projects from VS 2003 to VS2005/ASP 2.0. The worst problem I've run into is all references (in codebehind CS files) to UserControls fail. I get the error "The type...
7
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right...
0
by: Emily | last post by:
Imagine a world where everybody shares and has faith in each other. We have all struggled at one time or another with our jobs or careers and have wondered if there was a better way to make a...
5
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I'm developing a service which is two sites: a Mobile Site and a PC-Based Site. The whole goal is to have them operate very similarly but, of course, there will be many differences: 1....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.