• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 39
  • Last Modified:

Global resources file

I have 100 websites that hosting in the same server and they all use same company name and logo.

It is written in asp net and c# ... How can I make one changes to all?
0
ITsolutionWizard
Asked:
ITsolutionWizard
  • 3
  • 2
3 Solutions
 
funwithdotnetCommented:
Have you considered using an SSI (Server-Side Include) #include directive?
<!-- #include file="styles/companybanner.css" -->
<!-- #include file="companybanner.html" -->

Open in new window

0
 
ITsolutionWizardAuthor Commented:
I can consider but u have to show me how it works
0
 
funwithdotnetCommented:
Actually that answer was old-school. Since you have to edit anyway, perhaps:

   <%@ Page Language="vb"%>
   <html>
   <body>
        <%Response.WriteFile ("file.ext")%>
   </body>
   </html>

Open in new window


is the way to go.
0
 
ITsolutionWizardAuthor Commented:
Let us assume I have company name = "xyz" in the include file
How can I write on aspx page?
0
 
funwithdotnetCommented:
Pardon me if I don't really understand your question.
   <%@ Page Language="vb"%>
   <html>
   <body>
        <%Response.WriteFile ("includes\xyz_include.txt")%>
        <!-- or use an include directive ... -->
        <!-- #include file="xyz_companybanner.html" -->
        <!-- #include virtual="includes\xyz_companybanner.html" -->
   </body>
   </html>

Open in new window


... shows how you can add the contents of a file to an .aspx page.

To be honest, today, I probably wouldn't use either of the above examples for inclusion in 100 similar websites. I'd probably point all 100 host names at the same web site and adjust content as necessary. How that is done depends on many factors.

Good luck!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now