Wrox Programmer Forums
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 20th, 2003, 05:39 AM
Registered User
Join Date: Jul 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default write info from user input into a text file

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 ...
Old September 20th, 2003, 01:59 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

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")
' Cleanup
Set aFile = Nothing

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




Imar Spaanjaars
Everyone is unique, except for me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write to text file ? method Beginning VB 6 1 April 13th, 2006 01:54 AM
Write Text file from recordset rylemer Access 2 December 5th, 2003 10:23 AM
Display bar code in a Form using user input text? phoenixcu Access VBA 1 June 6th, 2003 02:39 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.