"Kevin Raleigh" <kr******@sbcglobal.netwrote in message
news:9a******************************@giganews.com ...
I would like to capture the data from a textarea box and save it to a
file.
Can you advise?
Will this help? Watch for word-wrap.
<%@ Language = "VBScript" %>
<% Option Explicit
'*
Const cASP = "areafile.asp"
Const cOTF = "areafile.txt"
'*
Dim strTXT
strTXT = Request.Form("Area")
If strTXT <"" Then
Call Area()
Response.Write strTXT
Response.End
End If
Sub Area()
Dim strOTF
strOTF = Server.MapPath(cOTF)
Dim objFSO
Dim objOTF
'*
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objOTF = objFSO.OpenTextFile(strOTF,2,True)
objOTF.Write(strTXT)
Set objOTF = Nothing
Set objFSO = Nothing
End Sub
%>
<html>
<head>
<title><%=cASP%></title>
</head>
<body>
<form action="<%=cASP%>" method="post">
<textarea name="Area" cols="50" rows="6">Hello World</textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>