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
Explain the different types of session state management options available with asp.net?
explain with example redaing contents and writing contents from a file using APS object stream.
Explain the difference between cookies collection and form/querystring collection?
how to configure asp.net website in vs2008. and the projects devoloped in 2005 can be run in 2008
What is aspx cs file?
What is a request body?
Explain the difference between sap r/2 and r/3?
how to implemet online examination in asp.net
Why does my code get a security exception when I run it from a network shared drive?
What do you need to run asp?
What is ascx cs?
What is Debit Memo & Credit Memo in Payables?
How can you change the primary scripting language for a page?
We have recently bought Hart 475 communicator , when we try to use it on transmitter it shows error : Voltage detected on FF connectors and later show No device found , can any one give me and idea about how to solve it.
What is application object in asp?