Oookay...
The FSO is an in-process component lets you do file operations such as
reading, writing, moving, copying, etc.
Check out MSDN for more info, and example code such as:
Const ForReading = 1
Const ForWriting = 2
Dim objFSO
Dim objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("c:\temp\bleh.txt",
ForWriting, True)
objFile.Write "all your base are belong to us"
objFile.Close
set objFile = objFSO.OpenTextFile("c:\temp\bleh.txt",
ForReading)
Response.write objFile.ReadAll
You could use the following to read in your HTML page:
set objFile = objFSO.OpenTextFile("c:\temp\bleh.txt",
ForReading)
strHTML = objFile.ReadAll
And then process it:
strHTML = Replace(strHTML, "[name]", "Joe Bloggs")
And then display it:
Response.Write strHTML
If Response.Buffer Then
Response.Flush
Response.End
End If
hth,
.ben
p.s. remember to destory your FSO and File objects, innit.
> -----Original Message-----
> From: Casey Crookston [mailto:[EMAIL PROTECTED]]
> Sent: 05 December 2002 16:12
> To: [EMAIL PROTECTED]
> Subject: [wdvltalk] RE: ASP or VBscript problem
>
>
> Does that make any sense?
>
> No. Let's start here: what does "open the HTML file using
> the FileSystemObject" mean.
>
> -----Original Message-----
> From: Ben Joyce
>
>
> Build your html page (or block of HTML if you need to repeat
> rows of data). Then, open the HTML file using the FileSystemObject
> (Scripting.FileSystemObject) and read in the contents. Using
> replace() you can swap occurances of [name] in the HTML with
> "Joe Bloggs" or whatever. Then Response.Write out the HTML
> to the page. Tada!
>
> Does that make any sense?
>
> .b
>
>
>
> ____ . 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]