Re: forms to text files with asp

by Andrej Kostresevic <temporalassassin(at)yahoo.com>

 Date:  Wed, 8 Aug 2001 08:38:04 -0700 (PDT)
 To:  Jeff Pearson <sales(at)webalchemy.on.ca>,
hwg-languages(at)hwg.org
 In-Reply-To:  f7f5z3
  todo: View Thread, Original
This should do what you need. 
<%
  Set Fso = Server.Createobject("Scripting.FileSystemObject")
  Set File =
Fs.OpenTextFile(""frm_submitted_"&replace(formatdatetime(now(),3),"
","_")&".txt", 8, true)

  'the following loops through the form and writes the name and value 
  'of each element to the file
  for each item in request.form
    File.Write item & ":" & request.form(item)& ","
  next
  'the name and value pairs are colon(:) delimited. 
  'the elements are comma(,) delimited, as requested. This is very easy 
  'to change
  File.Close
  Set File = Nothing
  Set Fs = Nothing
    
%>
hth,
Andrej
--- Jeff Pearson <sales(at)webalchemy.on.ca> wrote:
> Hello,
> 
> I have a client that wants to have a large form (over 80 form fields) 
> output to a text comma delimited file. There has to be a separate text 
> file written for each form submission.
> 
> I will be using ASP on Win2000. I know I would have to use a file system
> 
> object to write the files but exactly how would I do this and how do I 
> get unique text files per submission?
> 
> TIA
> 
> Jeff P.
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA