include file within script

I have the below code to auto-email a customer.

What is the syntax to include a file in the email? <!--#include
file="agreement_inc.asp" -->

HTML = HTML & "...just some text...<br>"
HTML = HTML & <!--#include file="agreement_inc.asp" -->
HTML = HTML & "</body>"
HTML = HTML & "</html>"

thanks
Shank [ Do, 17 April 2008 00:10 ] [ ID #1943789 ]

Re: include file within script

"shank" <shank [at] tampabay.rr.com> wrote in message
news:eRLZ95AoIHA.4292 [at] TK2MSFTNGP04.phx.gbl...
>I have the below code to auto-email a customer.
>
> What is the syntax to include a file in the email? <!--#include
> file="agreement_inc.asp" -->
>
> HTML = HTML & "...just some text...<br>"
> HTML = HTML & <!--#include file="agreement_inc.asp" -->
> HTML = HTML & "</body>"
> HTML = HTML & "</html>"
>
> thanks
>

sIncludeFile = "somefile.txt" ' modify as appropriate
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
set fRead = oFSO.OpenTextFile(sIncludeFile)
sReadText = fRead.ReadAll
fRead.Close
set fRead = nothing
set oFSO = nothing

HTML = HTML & "...just some text...<br>"
HTML = HTML & sReadText
HTML = HTML & "</body>"
HTML = HTML & "</html>"



HTH,

- Bob.
Bob Milutinovic [ Do, 17 April 2008 03:05 ] [ ID #1944617 ]
Webserver » microsoft.public.inetserver.asp.general » include file within script

Vorheriges Thema: ASP Page Generates: The requested resource is in use error.
Nächstes Thema: SQL query to populate dropdown