Hi,
Is it possible to open up a text file and then have it displayed in a HTML <TEXTAREA>? If so how? Also, if that is possible, how would I save it after changes have taken place? Thanks
Printable View
Hi,
Is it possible to open up a text file and then have it displayed in a HTML <TEXTAREA>? If so how? Also, if that is possible, how would I save it after changes have taken place? Thanks
here ya go, read a text file into a textarea:
after you submit the form, get the value, and use objTxtStream.Write method to rewrite the fileCode:<TEXTAREA>
<%
dim fso
dim objTxtStream
dim strText
set fso = server.CreateObject("Scripting.FileSystemObject")
set objTxtStream = fso.OpenTextFile("c:\inetpub\wwwroot\myfile.txt", 1)
strText = objtxtstream.ReadAll
Response.Write strtext
set fso = nothing
set objTxtStream = nothing
%>
</TEXTAREA>
check out the scripting runtime help for more info
Tom