0

We have a lot of websites with common functionality developed by 3 persons, in the business logic we use a common library project (in a shared directory) so we all use the same functions. This way the corrections and improvements are shared for the following projects or when we recompile an existing project. We have a class for some UI common functions too (loading a ListControl with x data and so)

The problem is with some web parts like CSS, Javascripts, Common Pages (login, configuration, customer management), those we don't know exactly how we can centralize them so we have those parts in the shared project so we don't have to copy paste corrections/improvements manually to the other websites each time...

Example of current website structure:

-MyWebSite1
    -Styles.css 
    -Scripts.js
    -Login.aspx
    -Funx.cs (Functions specific to this site)
    -Consx.cs (Session and other variables specific to this site)
-CommonProject (In a network shared directory)
    -FunBusiness.cs 
    -FunWebUI.cs    
    -ConsBusiness.cs
    -ConsWEB.cs

Is there a way of doing this?

VSP
  • 2,367
  • 8
  • 38
  • 59
  • if you use master page you can reference your style and javascript there – skhurams May 27 '13 at 12:03
  • @skhurams We already use MasterPages for each site and pass the corrections/improvements to them between the sites but how would you implement them like shared project? – VSP May 27 '13 at 15:05
  • read this article http://www.velocityreviews.com/forums/t237225-web-config-javascript.html – skhurams May 27 '13 at 15:18

2 Answers2

0

For now the closest we have come to solving this problem is following this article for the Javascript part: http://msdn.microsoft.com/en-us/library/bb398930(v=vs.100).aspx

We are now investigating using only one reference to a js file and including the other javascript references dinamically and the common CSS and MasterPages parts...

VSP
  • 2,367
  • 8
  • 38
  • 59
0

Maybe you can add those common references files as Linked File in Visual Studio. In this way you can maintain one file, while kept in a different location.

From Microsoft:

Link file leaves the file in its current location and maintains a link to the file from your current project.

Another solution would be to create a copy script before compile in Visual Studio. Reference over here.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325