Is there a way to include a dynamic .htm file in an asp

V

Vince@Netflow

Is there a way to include an .htm file in an .asp so that after publishing
the site to the web server a change to the .htm file is reflected when the
..asp is displayed.

I have tried using "Web Component"->"Included Content"->"Page", but this
seems to embed the .htm in the .asp at publish time and even if the .htm is
removed from the site, it is still displayed as part of the .asp file.

What I am trying to do is to allow content that has been created in Word
(saved as "htm" or saved as web page) to be included on a page in a web
site, and allow the creator to change that .htm file at his/her own
discretion

Thanks in Advance
Vince Sabatasse
 
R

Ronx

In the .asp file where the other file is to be included, use
<!-- #include file="subweb/includeme.htm" -->
where includeme.htm is the name of the file, and it is in a subweb
named subweb. (change the folder/subweb/page names to suit your
requirements.)

The .htm file should be named as above, but must NOT have any HTML
before <body> or after </body>. The <body> and </body> tags must also
be removed.

The included file is placed in a subweb so that the creator may use
any available method to upload the file, without compromising the main
web or it's security.- if FTP is used do not open the subweb in
FrontPage.

If you use the FrontPage include file component the included file is
embedded when the file is saved - which is before it is published. It
will not update until either file is published again using FrontPage,
or the Hyperlinks are recalculated on the server. The asp include
(AKA Server Side Include) is updated every time the page is viewed in
a browser. If the .htm file is removed from the server, a 500 error
will be generated, but this can be checked for in the asp code before
the include is substantiated.
 
V

Vince@Netflow

Thanks
Vince

Ronx said:
In the .asp file where the other file is to be included, use
<!-- #include file="subweb/includeme.htm" -->
where includeme.htm is the name of the file, and it is in a subweb named
subweb. (change the folder/subweb/page names to suit your requirements.)

The .htm file should be named as above, but must NOT have any HTML before
<body> or after </body>. The <body> and </body> tags must also be
removed.

The included file is placed in a subweb so that the creator may use any
available method to upload the file, without compromising the main web or
it's security.- if FTP is used do not open the subweb in FrontPage.

If you use the FrontPage include file component the included file is
embedded when the file is saved - which is before it is published. It
will not update until either file is published again using FrontPage, or
the Hyperlinks are recalculated on the server. The asp include (AKA
Server Side Include) is updated every time the page is viewed in a
browser. If the .htm file is removed from the server, a 500 error will be
generated, but this can be checked for in the asp code before the include
is substantiated.
 
K

Kevin Spencer

What I am trying to do is to allow content that has been created in Word
(saved as "htm" or saved as web page) to be included on a page in a web
site, and allow the creator to change that .htm file at his/her own
discretion

This is not easily doable. Browsers don't upload files. They download them,
or rather, a copy of them. So, when the user is editing an HTML document
served from the web server, he/she is only editing a local copy. To actually
EDIT the page, he/she would have to upload it back to the server and
overwrite the original, which involves some fairly sophisticated server-side
programming.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top