Click to See Complete Forum and Search --> : Create HTML file from Asp


shanuragu
06-26-2003, 08:56 AM
Hi
How can I create a html page from asp & write contents in to it???

Also to create text file I have used the following code but no txt file is created. What is wrong????


Dim fso, f, emailmessage
emailmessage="testing"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("d:\emailtest.txt", True)
f.WriteLine (emailmessage)
f.Close
ShaRa:confused:

CrazyGaz
06-26-2003, 03:18 PM
the text file works with me although when I open the page I get an error the file still writes :/

as for the HTML file I did it like so.

<%
Dim fso, f, emailmessage
emailmessage="<font color=red>testing"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("d:\emailtest.html", True)
f.WriteLine (emailmessage)
f.Close
%>