Could someone please help me in trying to read information from a text file into a web page (text box on a form).
AS i've tried everything and can't find out how. An example page would be greatly appreciated.
Printable View
Could someone please help me in trying to read information from a text file into a web page (text box on a form).
AS i've tried everything and can't find out how. An example page would be greatly appreciated.
hi neoknight
4guysfromrolla has a good description on how to do what you ask.
check out http://www.4guysfromrolla.com/webtech/040699-1.shtml
hope this helps
Ian
I just read that link as well Ian!
but I knocked-up a complete example...
Code:<%@ Language=VBScript %>
<%option explicit%>
<HTML>
<BODY>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f,myText
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\testfile.txt", ForReading, True)
Do While not f.AtEndOfStream
myText = myText & f.ReadLine & vbCrLf
Loop
f.Close
Response.Write("<input value='" & mytext & "'>")
%>
</BODY>
</HTML>
cheers mark, it's just that I didn't have enough time to do it myself.
Ian