Skip to content
Related Articles

Related Articles

Improve Article

ASP TextStream.Column Property

  • Last Updated : 03 Mar, 2021

The ASP Column Property is used to return the column number of a current character position in a TextStream file.  It is a read-only property. 

Note: This property is 1 after a newline character is written (even before any other character is written).

Syntax:

TextStreamObject.Column

Example Code: Below code illustrates the ASP Column Property

ASP




<%
dim gfg,f,t,x,y
set gfg=Server.CreateObject("Scripting.FileSystemObject")
set f=gfg.CreateTextFile("d:\GFG.txt")   // creating a File
f.write("Hello GeeksForGeeks")
f.close
  // opening a file
set t=gfg.OpenTextFile("d:\GFG.txt",1,false)
do while t.AtEndOfStream<>true
 x=t.Read(1)
 y=t.Column-1
loop
t.close
Response.Write("The last character in the text file is: " & x)
Response.Write("<br> at character position: " & y)
%>

Output:

The last character in the text file is: s
at character position: 19
My Personal Notes arrow_drop_up
Recommended Articles
Page :