Answer Posted / 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 View All Answers
Is asp a language?
Define text stream object?
Define garbage collection?
Explain the difference between the value-type variables and reference-type variables in terms of garbage collection?
Explain the post and get method?
What is the Difference B/W Onclick() and Oncommand() in ASP.Net? If Possible Explain with Realtime Example?
Whats the implicit name and type of the parameter that gets passed into the class set method?
What is a service application?
Define extranet?
Where is the value-type variables allocated in the computer ram?
What is aspx cs file?
What are the 3 types of internal controls?
Explain how do you box a primitive data type variable?
What is Debit Memo & Credit Memo in Payables?
What are private assemblies and shared assemblies?