tekken
January 30th, 2004, 07:52 AM
Could someone please help me with an ASP problem. I want to havethe drug prices in a single textfile 1/line and then fetch the correct line where I want the price.
I found the below code, andit works for fething the first line but how do I fetch say 3 lines? E.x line nr 20, 32 and 9?
code
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<html>
<body>
<p>This is the first line of the text file:</p>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
Response.Write(f.ReadLine)
f.Close
Set f=Nothing
Set fs=Nothing
%>
</body>
</html>
</BLOCKQUOTE>
I found the below code, andit works for fething the first line but how do I fetch say 3 lines? E.x line nr 20, 32 and 9?
code
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<html>
<body>
<p>This is the first line of the text file:</p>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
Response.Write(f.ReadLine)
f.Close
Set f=Nothing
Set fs=Nothing
%>
</body>
</html>
</BLOCKQUOTE>