Google Answers Logo
View Question
 
Q: How to manage text values for multiple web pages ( Answered,   1 Comment )
Question  
Subject: How to manage text values for multiple web pages
Category: Computers > Programming
Asked by: iquest-ga
List Price: $10.00
Posted: 18 Apr 2004 03:35 PDT
Expires: 18 May 2004 03:35 PDT
Question ID: 332052
I'm a newbie when it comes to web programming and only recently
learned how to manage style elements for multiple web pages by using
style sheets. However, I would very much like to manage text values
that are displayed on multiple web pages in a comparable manner, but
I'm clueless as to how..

Does anyone of you out there know of a way to program web pages such
that when one changes a text value in a central file, that value is
automatically displayed on all pages that refer to (the corresponding
tag in) the central file?  Any help is greatly appreciated.

Clarification of Question by iquest-ga on 18 Apr 2004 03:41 PDT
I am not looking for a database solution, but something of a central
file (like css for style elements) in which text values can be set and
to which I can have multiple pages refer.
Answer  
Subject: Re: How to manage text values for multiple web pages
Answered By: funkywizard-ga on 19 Apr 2004 20:37 PDT
 
Server Side Includes will do exactly what you have described. I use it
on my website akddr.com, to which effect each page has a left
navigation bar and a top header that need not be changed for each
individual page, rather it can be changed via a central file.
Virtually all paid and many unpaid webhosting services support server
side includes.

Specific information on all the options for SSI are at the following address:
http://support.nshosts.com/hhssi.shtml

The method for using SSI that you will probably find most useful is as follows:

#include

Inserts a file into the document. You may nest documents up to 8
layers. Use the virtual keyword for URL-based includes and the file
keyword for path based includes. Example usage:

<!--#include virtual="stuff/extra.txt"-->
<!--#include file="d:\website\yourdomaincom\mystuff\extra.txt"--> 

This will then have the webserver read in the file (extra.txt in this
case) and insert it into your current html document. Just insert the
<!--#include ...> statement inside your normal html document.

In order for the server to recognize that you are using SSI, you
should rename the html file .shtml so that the server will look for
the include tags. The file extentsion required to activate SSI is
usually configurable, but shtml is the default.

I hope this fully answers your question.

Search Strategy:
://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=server+side+includes+usage
Comments  
Subject: Re: How to manage text values for multiple web pages
From: samrat_barve-ga on 18 Apr 2004 22:02 PDT
 
hi iquest ,

If u r using plain ASP (Not Asp.net) 

here is code u need
http://www.w3schools.com/asp/asp_incfiles.asp

if  ur using JSP

http://java.sun.com/products/jsp/syntax/1.2/syntaxref1214.html#8828
http://java.sun.com/products/jsp/syntax/1.2/syntaxref129.html#997991


for Dot net 
please refer code at the bottom this page 
http://samples.gotdotnet.com/quickstart/aspplus/doc/webformssyntaxref.aspx

I could have explain all but Due to shortage of time  i have given u links.
hope it helps u ..

Samrat.A.Barve

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy