Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

Include files

In ASP I type <!-- #Include Virtual="directory/filename.inc" -->

What should I write to include a file (with HTML code) on a page?
0
aspdev
Asked:
aspdev
  • 4
  • 4
1 Solution
 
sybeCommented:
<!-- #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
 
aspdevAuthor Commented:
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
 
sybeCommented:
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
aspdevAuthor Commented:
IIS4 so I guess it should work then...
0
 
sybeCommented:
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
 
aspdevAuthor Commented:
Thanx. Btw, what does the "Virtual" stand for?
0
 
sybeCommented:
"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
 
aspdevAuthor Commented:
Ok thanx again. Now go answer my other questions =]
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now