
Server Side Include One of the most useful tools available for "navigation tool" management is the server side include. Just like the scripting we did in assignment #8, a server side include is something that is processed on the server, and the result is given to the browser. A server side include is a very simple scripting tool. The server is given the name of a file, and that file is inserted into the HTML of the page. The whole process is two steps.
This makes a server side include perfect for a navigational tool. The code looks like this:
This same line of code can be inserted on every page on an entire web site. When a visitor opens any page on the site, the server looks through the code for scripting information, and finds this line. The server takes the indicated include file, and inserts the code from that file into the current HTML. The browser receives nothing that indicates the HTML came from a second file. The process is entirely seamless. There are two rules you must follow to make a server side include work on a server that handles ASP. The main page (the file that receives the include file) must have a name that ends with one of the following file extensions:
The include file must have one of the following file extensions
For this class, use .ASP for both your main web page and the include file.
|