|
-
Jul 3rd, 2000, 04:54 PM
#1
Thread Starter
Hyperactive Member
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
-
Jul 4th, 2000, 12:35 AM
#2
Guru
here ya go, read a text file into a textarea:
Code:
<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>
after you submit the form, get the value, and use objTxtStream.Write method to rewrite the file
check out the scripting runtime help for more info
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|