Discussion Locked

Submiting a form in in asp

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I created a htm form which sends it results to a comma delimited text file. I need to get information using the QueryString function so I renamed the page from htm to asp and added the functionality. Now when I click submit I do not get the results page and no data is written to the result file. What do I need to do to get the submit to write to the result file with an asp page?

4 replies

by keith.hall1

BTW you'll need to use the filesystem object to write to file
'Create FileSytemObject Component
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")

'Create and Write to a File
filename = "file.csv"
pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))
Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd)& filename)

MyFile.Write "stuff"

MyFile.Close

This discussion is closed to new replies.