Re: ASP.NET - multiple applications sharing pages/ controls
From: Shan Plourde (------_at_---.net)
Date: 07/28/04
- Next message: Sivaraj R.P: "Visio Like Drawing"
- Previous message: Floyd Burger: "Re: Irregularly Shaped Windows"
- In reply to: John Saunders: "Re: ASP.NET - multiple applications sharing pages/ controls"
- Next in thread: John Saunders: "Re: ASP.NET - multiple applications sharing pages/ controls"
- Reply: John Saunders: "Re: ASP.NET - multiple applications sharing pages/ controls"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Jul 2004 04:53:52 GMT
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" <shikarishambu70@hotmail.com> wrote in message
>news:e4eoatBdEHA.3620@TK2MSFTNGP10.phx.gbl...
>
>
>>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.
>
>
- Next message: Sivaraj R.P: "Visio Like Drawing"
- Previous message: Floyd Burger: "Re: Irregularly Shaped Windows"
- In reply to: John Saunders: "Re: ASP.NET - multiple applications sharing pages/ controls"
- Next in thread: John Saunders: "Re: ASP.NET - multiple applications sharing pages/ controls"
- Reply: John Saunders: "Re: ASP.NET - multiple applications sharing pages/ controls"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|