PC Review


Reply
Thread Tools Rate Thread

ASP.NET - multiple applications sharing pages/ controls

 
 
Shikari Shambu
Guest
Posts: n/a
 
      27th Jul 2004
Hi All,
I have a situation where multiple applications are sharing some pages/
controls.

So, I have a separate common project that has the common pages/ controls.

My question is how do I reference these pages/ controls from my ASP.NET web
projects

WEbApp1 url http://localhost/app1 C:\Apps\App1
WEbApp2 url http://localhost/app2 C:\Apps\App2
Common C:\Apps\Common

And, what are the best practices for scenarios like this

TIA


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      27th Jul 2004
"Shikari Shambu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
> I have a situation where multiple applications are sharing some pages/
> controls.
>
> So, I have a separate common project that has the common pages/ controls.
>
> My question is how do I reference these pages/ controls from my ASP.NET

web
> projects
>
> WEbApp1 url http://localhost/app1 C:\Apps\App1
> WEbApp2 url http://localhost/app2 C:\Apps\App2
> Common C:\Apps\Common
>
> And, what are the best practices for scenarios like this


ASP.NET isn't really set up to work like this.

In order to share controls, you should create custom controls instead of
user controls. Multiple site can share the assembly containing the custom
controls.

You can share pages by placing the shared pages into a separate web
application. Then, both App1 and App2 can have links to the shared pages in
App3.

And, of course, you can share common types in an assembly which both web
applications reference.
--
John Saunders
johnwsaundersiii at hotmail


 
Reply With Quote
 
Shan Plourde
Guest
Posts: n/a
 
      28th Jul 2004
The approach that I have been using (small scale in house projects) is
to create shared assemblies that I register in the GAC. These shared
assemblies contain my code behind logic. Then in each web application, I
have an .ascx page that extends from the code behinds in the shared
assemblies.

In general I favor this to custom controls in many situations because I
find that it is much much easier to make stylistic changes.

We have had support for symbolic links to files since Windows 2000. I
have used this with success across multiple web applications. I use it
at times for .ascx files that I wish to reuse in other web applications.
You can have your shared .ascx files deployed in the same area as your
shared assemblies that contain your code behinds. I think that this is
good for reuse at a smaller scale.



John Saunders wrote:

>"Shikari Shambu" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>
>
>>Hi All,
>> I have a situation where multiple applications are sharing some pages/
>>controls.
>>
>>So, I have a separate common project that has the common pages/ controls.
>>
>>My question is how do I reference these pages/ controls from my ASP.NET
>>
>>

>web
>
>
>>projects
>>
>>WEbApp1 url http://localhost/app1 C:\Apps\App1
>>WEbApp2 url http://localhost/app2 C:\Apps\App2
>>Common C:\Apps\Common
>>
>>And, what are the best practices for scenarios like this
>>
>>

>
>ASP.NET isn't really set up to work like this.
>
>In order to share controls, you should create custom controls instead of
>user controls. Multiple site can share the assembly containing the custom
>controls.
>
>You can share pages by placing the shared pages into a separate web
>application. Then, both App1 and App2 can have links to the shared pages in
>App3.
>
>And, of course, you can share common types in an assembly which both web
>applications reference.
>
>


 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      28th Jul 2004
"Shan Plourde" <------@---.net> wrote in message
news:AjGNc.896$(E-Mail Removed)...
> The approach that I have been using (small scale in house projects) is
> to create shared assemblies that I register in the GAC. These shared
> assemblies contain my code behind logic. Then in each web application, I
> have an .ascx page that extends from the code behinds in the shared
> assemblies.
>
> In general I favor this to custom controls in many situations because I
> find that it is much much easier to make stylistic changes.
>
> We have had support for symbolic links to files since Windows 2000. I
> have used this with success across multiple web applications. I use it
> at times for .ascx files that I wish to reuse in other web applications.
> You can have your shared .ascx files deployed in the same area as your
> shared assemblies that contain your code behinds. I think that this is
> good for reuse at a smaller scale.


That sounds like a pretty good idea. I forsee a problem with it in larger
projects, which is how do you document it? It's pretty far from the "normal"
way to do things.
--
John Saunders
johnwsaundersiii at hotmail


> John Saunders wrote:
>
> >"Shikari Shambu" <(E-Mail Removed)> wrote in message
> >news:(E-Mail Removed)...
> >
> >
> >>Hi All,
> >> I have a situation where multiple applications are sharing some

pages/
> >>controls.
> >>
> >>So, I have a separate common project that has the common pages/

controls.
> >>
> >>My question is how do I reference these pages/ controls from my ASP.NET
> >>
> >>

> >web
> >
> >
> >>projects
> >>
> >>WEbApp1 url http://localhost/app1 C:\Apps\App1
> >>WEbApp2 url http://localhost/app2 C:\Apps\App2
> >>Common C:\Apps\Common
> >>
> >>And, what are the best practices for scenarios like this
> >>
> >>

> >
> >ASP.NET isn't really set up to work like this.
> >
> >In order to share controls, you should create custom controls instead of
> >user controls. Multiple site can share the assembly containing the custom
> >controls.
> >
> >You can share pages by placing the shared pages into a separate web
> >application. Then, both App1 and App2 can have links to the shared pages

in
> >App3.
> >
> >And, of course, you can share common types in an assembly which both web
> >applications reference.
> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Sharing pages/controls Mantorok Microsoft ASP .NET 1 6th Jun 2006 03:51 PM
TabControl and Sharing Controls on pages scorpion53061 Microsoft VB .NET 5 14th Jan 2005 09:23 PM
Session State & Master Pages With Multiple Applications =?Utf-8?B?Um9iZXJ0IFNwcmFndWU=?= Microsoft ASP .NET 0 10th Jan 2005 08:01 PM
ASP.NET - multiple applications sharing pages/ controls Shikari Shambu Microsoft ASP .NET 3 28th Jul 2004 11:40 AM
Sharing applications with multiple users Deviator Windows XP General 3 29th May 2004 05:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 AM.