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

Explain how to refresh an asp page on a single click of a button?

0 Answers  


what is the is the difference between asp and asp.net?

1 Answers   HCL,


What are shared assemblies?

0 Answers  


Speaking of boolean data types, whats different between c# and /c++?

0 Answers  


what is the selection process for DMSS??

1 Answers  






Define application object?

0 Answers  


which sdlc model was used for whatsapp?

0 Answers  


Name the event handlers of application object?

0 Answers  


what is execution of asp page

1 Answers  


What is .asp in html?

0 Answers  


How do you initialize a two-dimensional array that you don't know the dimensions of?

0 Answers  


How does if-not-modified-since work? How can it be programmatically implemented with ASP.NET?

0 Answers  


Categories