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

Share User Controls Between Multiple projects

We have a web application with at least 570 Pages and 10's of user controls
....all under project name LinkDevProject ...recently we start separating the
project into multiple projects ....the problem we have in user controls how
to share them without duplicate the control in each project ....we need to
remain the controls in main project and all subproject use them .....what is
the avaiable technique to achieve this?
Nov 19 '05 #1
5 5076
Put the controls in their own assembly and use that in the other projects.
--
Klaus H. Probst, MVP
http://www.simulplex.net/
"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
We have a web application with at least 570 Pages and 10's of user controls ...all under project name LinkDevProject ...recently we start separating the project into multiple projects ....the problem we have in user controls how to share them without duplicate the control in each project ....we need to
remain the controls in main project and all subproject use them .....what is the avaiable technique to achieve this?

Nov 19 '05 #2

Put the controls in their own assembly, how is that?
"Klaus H. Probst" wrote:
Put the controls in their own assembly and use that in the other projects.
--
Klaus H. Probst, MVP
http://www.simulplex.net/
"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
We have a web application with at least 570 Pages and 10's of user

controls
...all under project name LinkDevProject ...recently we start separating

the
project into multiple projects ....the problem we have in user controls

how
to share them without duplicate the control in each project ....we need to
remain the controls in main project and all subproject use them .....what

is
the avaiable technique to achieve this?


Nov 19 '05 #3
Usercontrols aren't really designed to be shared. If you want to have reuse
then the approach is to write a class that derives from Control or WebControl.
This means the control is all in code (no ASCX or designer support) and is
compiled into an assembly (DLL). This is the primary reuse approach. Here
are the quickstarts for that:

http://samples.gotdotnet.com/QuickSt...authoring.aspx

The other approach is a bit of a hack, but you can share ASCX files across
IIS applications by mapping a virtual directory under each of your app folders
to the directory that contains all of your ASCX files. If they use codebehind
then you'll have to copy that assembly to all the apps' ~/bin direcotry.

-Brock
DevelopMentor
http://staff.develop.com/ballen
We have a web application with at least 570 Pages and 10's of user
controls ...all under project name LinkDevProject ...recently we start
separating the project into multiple projects ....the problem we have
in user controls how to share them without duplicate the control in
each project ....we need to remain the controls in main project and
all subproject use them .....what is the avaiable technique to achieve
this?


Nov 19 '05 #4

"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
Put the controls in their own assembly, how is that?


Well, if you're using standard UserControl-derived (ASCX) controls that
won't help you, sorry. However it is possible to create a separate assembly
with classes that derive directly from WebControl or Control (or even
TemplateControl though that's less common) and then add a reference to that
assembly in your other projects.
--
Klaus H. Probst, MVP
http://www.simulplex.net/
Nov 19 '05 #5
Hi!

Is´nt that possible to do this with sourcesafe, if you use that?

/Marre
Nov 19 '05 #6

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

Similar topics

3
by: AARON PECORARO | last post by:
I need to split apart my web application into multiple projects to allow it to be distributed in parts, but all of the projects need to work together (ie. they need to share session information)....
3
by: Newbee Adam | last post by:
anyone have any secrets or pearls about vb.net you want to share I was asked by my company to begin teach an introductory VB.Net course 2 day seminar. I had been teaching an sql server 2000...
2
by: TaeHo Yoo | last post by:
Hi all, I have a solution which contains multiple projects. Those multiple projects should share the same session. For example, users login, create the session for users then these session...
2
by: Brian Henry | last post by:
Is it possible to create web users controls which can actively be used on multiple projects? similarly to how a winforms user control can be used in multiple project when referenced. What I want...
4
by: dx | last post by:
I have 3 vb.net web applications. I would like all 3 to have access to a library of user controls. server controls wouldn't cause a problem but these are user controls (ascx.) From each solution...
1
by: Raed Sawalha | last post by:
I have a web application with 100 pages and 30 user controls so we decided to separate some pages and controls into sub projects ( the generated subprojects was 2) the problem we have that now the...
8
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem...
9
by: moondaddy | last post by:
I'm using asp.net 2.0 and c# and would like to share some user control between several websites. these websites are on the same server and have a physical location right next to each other like...
4
by: | last post by:
I'm going to ask the really short version of a rambing scenario I posted in Feb.: http://tinyurl.com/2nx4k7 The short version: a) A VS.NET solution can comprise many projects. If you're working...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.