WebBuilder101 - Making the web happen!
Need Web Dev software? Here is the place to
Flash Point
Using SSI in ASP pages

By Eddy R.
4-13-00

If you've tried to use SSI (server side includes) before then you probably know that for SSI to work, the web pages that contain the includes must have either a .shtm or .shtml extension. This really is not a big deal - that is if your situation is like one or all of the following:

  • Your web server is setup to parse all files for SSI

  • You have very few web pages that use SSI

  • You do not use SSI at all

On the other hand, if you want to start using SSI on web pages that have .asp extensions and your server does not parse all files for SSI, then you have a big problem. What's the solution? Well, there are two solutions to this problem.

Solution #1 - The difficult way

Rename all of your files from Asp to .shtml, but wait, If you do rename your files, whatever ASP code is in them won't be parsed at all because for ASP code to work your files must have a .asp extension, also think about the nightmare you are going to have updating probably thousands of links throughout your site. Hmm....this really isn't the way to go.

Solution #2 - The easy way...really

Use SSI in your ASP pages!

In case you didn't know, most web servers are setup to parse ASP files for SSI code. Yes, simply add your SSI line anywhere you want the SSI to appear, like so:

<!--#include virtual="your_ssi_file_name.txt"-->

The beauty of this is that you do not need to rename your files to .shtm or .shtml, and you can run both ASP and SSI code from the same web page. Oh-oh, I think I just made someone's day :-)

.

 

More Resources
Server Side Include
SSI how to..
How to create a text file

Suggested Reading

Beginning Active Server Pages 3.0
JavaScript Bible
Red Hat Linux
Dreamweaver 3.0
HTML Bible



Download WB101 Wallpaper
• Web Builder 101 Wallpaper Get it!.
• Find out how to create your own Wallpaper Teach me!.
Sign up for our Newsletters
• Web Building Sign me Up!.
• Net Alert! Sign me Up!.
Need Help?
• Contact Support Click here.
• E-mail the Webmaster Click Here.
• Search Tips Click Here.

Webbuilder101.com © 1998 - 2003 Copyright and Terms of Use
Send mail to: webmaster@webbuilder101.com

» About » Support

» FAQ » What's New » MyLog

Web Builder 101 Web Builder 101 - Making the Web Happen Web Builder 101 - Making the Web Happen
.