YouTip LogoYouTip

Prop Line

ASP Line Property | Tutorial

Tutorial -- Learning not just technology, but dreams!

ASP Tutorial

ASP Tutorial ASP Introduction ASP Installation ASP Syntax ASP Variables ASP Procedures ASP Forms ASP Cookies ASP Session ASP Application ASP #include ASP Global.asa ASP Send Email

ASP Objects

ASP Response ASP Request ASP Application ASP Session ASP Server ASP Error ASP FileSystem ASP TextStream ASP Drive ASP File ASP Folder ASP Dictionary ASP ADO

ASP Components

ASP AdRotator ASP BrowserCap ASP Content Linking ASP Content Rotator

ASP and AJAX

AJAX Introduction AJAX ASP AJAX Database

ASP Summary

ASP Quick Reference ASP Summary

ASP Examples

ASP Examples

ASP FileSystem Object ASP Drive Object

Deep Dive

  • Software
  • Web Design & Development
  • Programming
  • Web Services
  • Programming Languages
  • Scripting Languages
  • Scripts
  • Development Tools
  • Computer Science
  • Web Service

ASP Line Property


TextStream Object Reference Manual Complete TextStream Object Reference Manual


The Line property returns the current line number (starting from 1) in a TextStream file.

Syntax

TextStreamObject.Line

Example

<%
 dim fs,f,t

 set fs=Server.CreateObject("Scripting.FileSystemObject")

 set f=fs.CreateTextFile("c:test.txt",true)

 f.WriteLine("Hello World!")

 f.WriteLine("How are you today?")

 f.WriteLine("Goodbye!")

 f.close

 Set t=fs.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 World!

Line 2: How are you today?

Line 3: Goodbye!

TextStream Object Reference Manual Complete TextStream Object Reference Manual

← Met CloseProp Column β†’