explain uses of Textstream object in ASP



explain uses of Textstream object in ASP..

Answer / jatin arora

The TextStream Object

The TextStream object is used to access the contents of text
files.

The following code creates a text file (c:\test.txt) and
then writes some text to the file (the variable f is an
instance of the TextStream object):


<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt",true)
f.WriteLine("Hello World!")
f.Close
set f=nothing
set fs=nothing
%>

To create an instance of the TextStream object you can use
the CreateTextFile or OpenTextFile methods of the
FileSystemObject object, or you can use the OpenAsTextStream
method of the File object.

The TextStream object's properties and methods are described
below:

Properties

Property Description

AtEndOfLine Returns true if the file pointer is positioned
immediately before the end-of-line marker in a TextStream
file, and false if not

AtEndOfStream Returns true if the file pointer is at the
end of a TextStream file, and false if not
Column Returns the column number of the current character
position in an input stream

Line Returns the current line number in a TextStream file

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP Interview Questions

What is full form of aspx?

0 Answers  


Explain the difference between sap r/2 and r/3?

0 Answers  


In which database is the information, such as membership, role management, profile, and Web parts personalization, stored?

1 Answers   MindCracker, Muthoot Group,


What is the difference between 1.1 and 2.0 .Net framework?

2 Answers   DLI,


Explain the difference between post & get method in asp?

0 Answers  






What is the difference between ASP and HTML?

9 Answers  


According to dot net is error and exception are same or different?

3 Answers  


Define the asp scripting objects?

0 Answers  


What are the advantages of asp?

0 Answers  


how many Controls are there in ASP.Net ? Define with Examples ?

1 Answers   TPS,


Explain the function of attributes in tags?

0 Answers  


When did classic asp come out?

0 Answers  


Categories