Mhtml
07-17-2002, 07:04 AM
Ok. I have read a post in this forum already on writing to a html page but I didn't quite understand it. I am learning asp but I'd like a little help on this.
(HERE's THE THREAD I'VE LOOKED @ http://www.codingforums.com/showthread.php?s=&threadid=897&highlight=writing+text+file)
In the post I viewed I saw that you need to open the system file object or something...
<%@Language=VBScript%>
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.CreateTextFile("FULL_PATH_TO_YOUR_FILE", true)
fs.write(Request.Form("theText"))
fs.Close
set fs = nothing
set fso = nothing
%>
THAT IS FOR SENDING VIA FORM
But I can't get it to work for my self.
I'll show you my source:
The main page is called appendage.htm:
<html>
<head>
</head>
<body>
<form action="www21.brinkster.com/cubestudios/appender.asp" method="post">
<textarea rows="10" cols="30" name="text1"></textarea>
<br>
<input type="submit">
</form>
</body>
</html>
The .asp page is called appender.asp:
<%@Language=VBScript%>
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.CreateTextFile("www21.brinkster.com/cubestudios/appendee.asp", true)
fs.write(Request.Form("form1"))
fs.Close
set fs = nothing
set fso = nothing
%>
<html
<head>
</head>
<body>
</body>
</html>
and the page to be written to is apendee.htm:
<html>
<head>
</head>
<body>
</body>
</html>
That's all the info I think that you will need...Knowing mwe it is probably something extremely simple .lol:D
Thanks in advance..Mike
(HERE's THE THREAD I'VE LOOKED @ http://www.codingforums.com/showthread.php?s=&threadid=897&highlight=writing+text+file)
In the post I viewed I saw that you need to open the system file object or something...
<%@Language=VBScript%>
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.CreateTextFile("FULL_PATH_TO_YOUR_FILE", true)
fs.write(Request.Form("theText"))
fs.Close
set fs = nothing
set fso = nothing
%>
THAT IS FOR SENDING VIA FORM
But I can't get it to work for my self.
I'll show you my source:
The main page is called appendage.htm:
<html>
<head>
</head>
<body>
<form action="www21.brinkster.com/cubestudios/appender.asp" method="post">
<textarea rows="10" cols="30" name="text1"></textarea>
<br>
<input type="submit">
</form>
</body>
</html>
The .asp page is called appender.asp:
<%@Language=VBScript%>
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.CreateTextFile("www21.brinkster.com/cubestudios/appendee.asp", true)
fs.write(Request.Form("form1"))
fs.Close
set fs = nothing
set fso = nothing
%>
<html
<head>
</head>
<body>
</body>
</html>
and the page to be written to is apendee.htm:
<html>
<head>
</head>
<body>
</body>
</html>
That's all the info I think that you will need...Knowing mwe it is probably something extremely simple .lol:D
Thanks in advance..Mike