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 |
what is object in c sharp?
How to use XML file as a database in the ASP
1)Declare array with five elements a[]={8,4,6,2,1,10} Print minimum and maximum no from array.
Explain the advantages of using asp?
who is the best Trainer for ASP.NET MVC in Hyderabad?
Can any body send me Some Interview Questions of ASP.Net 2.0 or Later to my mail id that is gauravscott@gmail.com
How could u display all of the cookies/cookie values for a user through a Web page in ASP?
What is a variable in asp?
Why does my code get a security exception when I run it from a network shared drive?
What is asp give its application?
What is the order of precedence for logical operators.
What is hidden field?