?
Solved

Include files

Posted on 1998-09-30
8
Medium Priority
?
152 Views
Last Modified: 2013-11-18
In ASP I type <!-- #Include Virtual="directory/filename.inc" -->

What should I write to include a file (with HTML code) on a page?
0
Comment
Question by:aspdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 150 total points
ID: 1838224
<!-- #Include file="filename.inc" -->

You can use the Server Side includes in ASP but also in an HTML file. But you have to rename the file to .shtm or .shtml. Then IIS can do the SSI.
0
 

Author Comment

by:aspdev
ID: 1838225
I talk to another person and he said it wasn't possible if it was a regular .html file. Is that true? There is no other workaround except renaming it to shtml?
0
 
LVL 28

Expert Comment

by:sybe
ID: 1838226
There is a workaround: tell the server that it should treat ALL .htm and .html files as SSI pages. Depends on your server how to do that. What server do you use IIS3 or IIS4 ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:aspdev
ID: 1838227
IIS4 so I guess it should work then...
0
 
LVL 28

Expert Comment

by:sybe
ID: 1838228
Go to MMC, rightclick the website, choose properties.

Then:
- home directory
- configuration
- App mappings

There you see a list of extensions and what the server will do with it. You'll see that .shtml and .shtm will be run over a dll called ssinc.dll.
If you run the .htm and .html files over the same dll, you can use ssi in files with extension .htm and .html

That's all
0
 

Author Comment

by:aspdev
ID: 1838229
Thanx. Btw, what does the "Virtual" stand for?
0
 
LVL 28

Expert Comment

by:sybe
ID: 1838230
"virtual" is when you use a path to a virtual directory (as defined in the server). "file" is used when pointing to a physical path.

0
 

Author Comment

by:aspdev
ID: 1838231
Ok thanx again. Now go answer my other questions =]
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question