FSO Example:
If you have an HTML file that contains, say
[name]
in the exact place you want the name to appear, then you can call
GenerateOutputHtml() to read the html file
And return the string of html to write to the response
Adam
Dim fso ' handy to keep a global refernece to this
Function GenerateOutputHtml()
Dim InHTML, FilePath, OutHTML, Name
FilePath = "<insert real path to the html file here>"
Set fso = CreateObject("Scripting.FileSystemObject")
InHTML = ReadFileIntoString(FilePath)
Name = "Your name to appear in the output HTML"
GenerateOutputHtml = Replace(InHTML, "[name]", Name)
End Function
Private Function ReadFileIntoString(FilePath)
Dim TStream, Out
If fso.FileExists(FilePath) Then
Set TStream = fso.OpenTextFile(FilePath) ' returns a TextStream
object
If Not TStream Is Nothing Then
Out = TStream.ReadAll
TStream.Close
End If
End If
ReadFileIntoString = Out
End Function
-----Original Message-----
From: Mark Groen [mailto:[EMAIL PROTECTED]]
Sent: 05 December 2002 16:23
To: [EMAIL PROTECTED]
Subject: [wdvltalk] RE: ASP or VBscript problem
On December 05, 2002 at 10:59, Gerenday, Perry (P.) wrote:
> -----Original Message-----
> From: Ben Joyce [mailto:[EMAIL PROTECTED]]
>
>
> > failing that, build your HTML pages as templates and read
> > them in using
> > the FSO, replacing 'fields' in the mark-up, such [this] and
> > [that], with
> > real data at run-time.
>
> Ben,
>
> <borrowing from Franni> Greenhorn Newbie Alert </ borrowing>
>
> I have no idea what you just said. What's an FSO?
FSO is an acronym for FileSystemObject. It contains methods and properties
that allow you to create, delete, gain information about, and generally
manipulate drives, folders, and files.
Context-Switching is a process runs on the CPU until it is context switched.
Server-Side HTML is when you are using PHP, JAVA(JSP), ASP, etc. to display
browser pages.
HTH!
Regards,
Mark Groen
MG Web Services
Web Site Hosting and Development
www.markgroen.com
[EMAIL PROTECTED]
604-780-6917
____ * The WDVL Discussion List from WDVL.COM * ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To
unsubscribe send a blank email to %%email.unsub%%
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]