Subject: write info from user input into a text file
Posted By: pkdev Post Date: 9/20/2003 5:39:57 AM
AOA All,
I just want to write the information or data on a form submit into a text file ...
i hope u ve got my problem...
Can any one help me out this problem ....
sample code ll be appreciated ...
Thanx in advance ...
Reply By: Imar Reply Date: 9/20/2003 1:59:45 PM
Hi there,

You can use the FileSystemObject for that. A simple example:

'Variables Declaration
Dim fso
'Create Object for the ASP File
Set fso = Server.CreateObject("Scripting.FileSystemObject")
'Create the asp file
Set aFile = fso.CreateTextFile("C:\YourFile.txt",true)
aFile.WriteLine("I am a line in the file.")
aFile.WriteLine("So am I")
aFile.Close
' Cleanup
Set aFile = Nothing

Check out the docs for the FileSystemObject at the MSDN site:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsobjFileSystem.asp


Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.

Go to topic 4349

Return to index page 1042
Return to index page 1041
Return to index page 1040
Return to index page 1039
Return to index page 1038
Return to index page 1037
Return to index page 1036
Return to index page 1035
Return to index page 1034
Return to index page 1033