How You Do It
This is an ASP event, so you must be running this off of a server that can do it. What browser the user has is immaterial. The server is the thing in ASP. First, we create the page that contains the text to be inserted. I called it the "greeting" page in the example above. This text can be anything including HTML code, scripting, or anything. The server doesn't care. It's just going to replace the SSI command with whatever is on this page. Just remember, this page does not have to be a fully formed HTML document, or any type of document for that matter. It can just be a line of text with no alterations at all. Whatever is contained will simply be included where another page has the SSI command.
Save the page with a name and an .asp extension. It has to have the .asp extension. For this example we'll say we named the file "greeting.asp."
Next we'll create the page that is calling for the text included in greeting.asp.
Each page that will contain the SSI will need to be saved with the .asp extension. Always -- no exceptions.
In addition, all pages that will contain the SSI will need to have this as its first line:
<%@ LANGUAGE="VBSCRIPT" %> Get that line above everything including the DTD and the <HTML>. Always. No exceptions.
Now the simple part. Wherever you want the text of the file greeting.asp to appear, place this command:
<!-- #INCLUDE FILE="greeting.asp" --> When the page loads to the browser window, you'll have the text of the file greeting.asp where that SSI command above was placed. The source code will never show that command. Just the text from the other file.
It's a very slick little system. Just remember that the SSI command above is set up to display a file called greeting.asp. You'll need to change out the file name to whatever you name your own inclusion file.
That's That
That's the beginning skinny on Active Server Pages. I have three more examples lying in wait for the next three new tutorial posts. They are (1) An honest to goodness working password system, (2) a random ad banner event, and a (3) guestbook event that displays a "thank you" page that you can fully create. Other suggestions will be accepted via