Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > General > General Chat> Share same asp.net pages across multiple web sites?
 

Pages: 1
General Chat
Share same asp.net pages across multiple web sites?
Page:1/1 

  Print all messages in this thread  
Poster Message
llblPowa
User



Location:

Joined on:
19-Nov-2006 22:56:41
Posted:
41 posts
# Posted on: 08-Aug-2007 17:48:05.  
Hello Guys,

I am having a common ASP.NET problems (btw - nothing related to llbl) and really can't find a workaround for it, so may be you could help me :-)

I would like to share some common pages (and their logic) through multiple websites :

For example I am having the following web sites:

c:\wwwroot\app1
c:\wwwroot\app2
c:\wwwroot\app3

Theses web sites do have their own "look & feel".

But they will share some pages that are the same, for example the "my basket" page or the "my information page". These common files will use the css rendering of each site (app1, app2 & app3) but will have the same business logic.

Of course, the easiest way is to replicate the common pages into each application, but in doing that, it will quickly become a nighmare in maitenance, as if I change the code for one page, then, I will have to duplicate it across all the other sites.

Any clues?

Many thanks,

LlblPowa.
  Top
JimHugh
User



Location:
Davis, CA
Joined on:
16-Nov-2005 14:32:25
Posted:
191 posts
# Posted on: 08-Aug-2007 18:36:43.  
Have you looked into using ascx Asp.,Net user controls?

http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx has a good discussion, or you can Google it of course?


Jim Hughes  Top
jmeckley
User



Location:
Harrisburg, PA, USA
Joined on:
05-Jul-2006 16:03:19
Posted:
403 posts
# Posted on: 08-Aug-2007 19:33:23.  
if it's asp.net 2.0 you can use Themes to control the gui presentation. that way 1 site can have many different layouts.

themes contain Skins (*.skin) and the Skins contian layout and CSS attributes.
you could then setup your thems like this
MyWebSite
     App_Themes
         Theme1
             Label.skin
             Image.skin
             GridView.skin
         Theme2
             Label.skin
             Image.skin
             GridView.skin
         Theme2
             Label.skin
             Image.skin
             GridView.skin

in your code behind set the theme on PageLoad
Code:
string theme = //get theme from user profile, querystring, session, user input, etc.
this.Theme = theme;
Jason Meckley
Programmer
 
Top
llblPowa
User



Location:

Joined on:
19-Nov-2006 22:56:41
Posted:
41 posts
# Posted on: 09-Aug-2007 16:50:44.  
Thanks you guys for your feedback :-)

  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.