Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

ASP Textstream.Line Property

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The ASP Textstream.Line Property is a read-only property that can be used to return a current line number in a TextsStream File. 

Syntax:

TextStreamObject.Line 

Example: Below code returns the current line number:

ASP




<%
dim gfg,f,t
set gfg=Server.CreateObject("Scripting.FileSystemObject")
set f=gfg.CreateTextFile("d:\GFG.txt",true)
f.WriteLine("Hello GeeksForGeeks!")
f.WriteLine("A computer science portal for Geeks")
f.WriteLine("GFG is a Good platform tode!")
f.close
  
Set t=gfg.OpenTextFile("c:\test.txt",1)
do while t.AtEndOfStream=false
 Response.Write("Line " & t.Line & ": ")
 Response.Write(t.ReadLine)
 Response.Write("<br>")
loop
t.Close
%>

Output:

Line 1: Hello GeeksForGeeks!
Line 2: A computer science portal for geeks!
Line 3:  GFG is a Good Platform to code!
My Personal Notes arrow_drop_up
Last Updated : 03 Mar, 2021
Like Article
Save Article
Similar Reads
Related Tutorials