Working with the TextStream Object New Jersey

The TextStream object is the heart of most of the file manipulation in ASP 3.0. Check out this article to see the TextStream object in action.

Local Companies

iCIMS
800-889-4422
1301 State Route 36
Hazlet, NJ
TAKE Enterprise Services, Inc.
609-275-8384
502 Carnegie Center
Princeton, NJ
Shelko Consulting LLC
201-478-7170
214 State St
Hackensack, NJ
Accession Technology Accounting & CRM Software Consulting
888-808-1117
PO Box 400
Ridgewood, NJ
Made4net Supply Chain Execution Software
+(1) 201 645 43
87 S. Farview Ave.
Paramus, NJ
AICOM Solutions
609-751-5151
6F MetroPark Center
Woodbridge, NJ
Mantra Information Services
973-270-0995
10 North Park Place, Suite 210
Morristown, NJ
Power Vision
(973) 623-8000
24 Commerce St
Newark, NJ
Shelko Consulting LLC
201-478-7170
214 State Street
Hackensack, NJ
Language Success
(973) 648-0236
1 Newark Airport
Newark, NJ

provided by: 
Originally published at Internet.com


This article is brought to you by Premier Press
publisher of John Gosney's ASP Programming for the Absolute Beginner.

Working with the TextStream Object

The TextStream object is the heart of most of the file manipulation in ASP 3.0. There are three specific methods within the TextStream object: CreateTextFile, OpenTextFile, and OpenAsTextStream. The TextStream object has its own set of properties and methods. First, the properties: * AtEndOfLine. Returns a value of True if the file pointer (the location of the response as the file is read) is at the end of a line in the file * AtEndOfStream. Returns a value of True if the file pointer is at the end of the file * Column. Depending on the current character being read within the file, returns the column number of this character, starting from 1 * Line. Depending on the current line number being read within the file, returns this line number, starting from 1 And now, the methods of the TextStream object: * Close. Closes an open file. * Read (a number). Reads a specific number of characters from the file. For example, Read(20) reads the first 20 characters within the file being examined. * ReadAll(). Reads the entire file and places it within a text string. * ReadLine(). Reads a single line from the file and places it within a text string. * Skip (a number). Skips over a specific set of characters from the file being examined. * SkipLine. Skips a line when reading from the file being examined. * Write (a string). Writes a specified string to the file being examined. * WriteLine (a string). Writes a string to the file being examined and then writes a newline character within the file. * WriteBlankLines(a number). Writes the specified number of blank lines to the file being examined. The following is an example of the TextStream object in action. Note the location of where you create the file will vary (as well as the name of the actual text file: in this example, it is called "Test2File.txt"), depending on your particular server configuration. Working with the File Object An example of working with the File object!
<% set TestFile=Server.CreateObject("Scripting.FileSystemObject") set TFileStream= TestFile.CreateTextFile( "c:\inetpub\wwwroot\ASP_Examples\Test2File.txt") TFileStream.WriteLine "Welcome to the File Object in ASP!" TFileStream.WriteBlankLines(3) TFileStream.WriteLine "Between this line and the opening line are three blank lines. These blank lines were inserted using the WriteLine method of the TextStream object. Now, let's write three more blank lines before the next section of text is inserted." TFileStream.WriteBlankLines(3) TFileStream.WriteLine "Okay, that's better-three more blank lines have just been inserted! I think you probably get the idea of how to use the WriteLine method, so let's move on to more interesting things." TFileStream.Close %> After the page loads, the Test2File.txt file is created. Navigate to the location of this file - it should look something like this (all the text you asked to be inserted, including the blank lines is included within this file)...

Read article at Internet.com site

Featured Local Company

AICOM Solutions

609-751-5151
6F MetroPark Center
Woodbridge, NJ

Regional Articles
- Working with the TextStream Object Absecon NJ
- Working with the TextStream Object Asbury Park NJ
- Working with the TextStream Object Atlantic City NJ
- Working with the TextStream Object Barnegat NJ
- Working with the TextStream Object Basking Ridge NJ
- Working with the TextStream Object Bayonne NJ
- Working with the TextStream Object Bayville NJ
- Working with the TextStream Object Belle Mead NJ
- Working with the TextStream Object Belleville NJ
- Working with the TextStream Object Belmar NJ
- Working with the TextStream Object Bergenfield NJ
- Working with the TextStream Object Blackwood NJ
- Working with the TextStream Object Bloomfield NJ
- Working with the TextStream Object Boonton NJ
- Working with the TextStream Object Bordentown NJ
- Working with the TextStream Object Brick NJ
- Working with the TextStream Object Bridgeton NJ
- Working with the TextStream Object Bridgewater NJ
- Working with the TextStream Object Browns Mills NJ
- Working with the TextStream Object Burlington NJ
- Working with the TextStream Object Caldwell NJ
- Working with the TextStream Object Camden NJ
- Working with the TextStream Object Cape May Court House NJ
- Working with the TextStream Object Cape May NJ
- Working with the TextStream Object Carteret NJ
- Working with the TextStream Object Cherry Hill NJ
- Working with the TextStream Object Clark NJ
- Working with the TextStream Object Clementon NJ
- Working with the TextStream Object Cliffside Park NJ
- Working with the TextStream Object Clifton NJ
- Working with the TextStream Object Collingswood NJ
- Working with the TextStream Object Colonia NJ
- Working with the TextStream Object Cranford NJ
- Working with the TextStream Object Denville NJ
- Working with the TextStream Object Deptford NJ
- Working with the TextStream Object Dumont NJ
- Working with the TextStream Object East Brunswick NJ
- Working with the TextStream Object East Orange NJ
- Working with the TextStream Object Eatontown NJ
- Working with the TextStream Object Edison NJ
- Working with the TextStream Object Egg Harbor Township NJ
- Working with the TextStream Object Elizabeth NJ
- Working with the TextStream Object Englewood NJ
- Working with the TextStream Object Englishtown NJ
- Working with the TextStream Object Ewing NJ
- Working with the TextStream Object Fair Lawn NJ
- Working with the TextStream Object Flemington NJ
- Working with the TextStream Object Forked River NJ
- Working with the TextStream Object Fort Lee NJ
- Working with the TextStream Object Freehold NJ
- Working with the TextStream Object Garfield NJ
- Working with the TextStream Object Glassboro NJ
- Working with the TextStream Object Hackensack NJ
- Working with the TextStream Object Hackettstown NJ
- Working with the TextStream Object Haddon Township NJ
- Working with the TextStream Object Haddonfield NJ
- Working with the TextStream Object Haledon NJ
- Working with the TextStream Object Hammonton NJ
- Working with the TextStream Object Hazlet NJ
- Working with the TextStream Object Hightstown NJ
- Working with the TextStream Object Hillside NJ
- Working with the TextStream Object Hoboken NJ
- Working with the TextStream Object Holmdel NJ
- Working with the TextStream Object Howell NJ
- Working with the TextStream Object Irvington NJ
- Working with the TextStream Object Iselin NJ
- Working with the TextStream Object Jackson NJ
- Working with the TextStream Object Jersey City NJ
- Working with the TextStream Object Kearny NJ
- Working with the TextStream Object Keyport NJ
- Working with the TextStream Object Lakehurst NJ
- Working with the TextStream Object Lakewood NJ
- Working with the TextStream Object Linden NJ
- Working with the TextStream Object Livingston NJ
- Working with the TextStream Object Long Branch NJ
- Working with the TextStream Object Lyndhurst NJ
- Working with the TextStream Object Madison NJ
- Working with the TextStream Object Mahwah NJ
- Working with the TextStream Object Manahawkin NJ
- Working with the TextStream Object Manchester Township NJ
- Working with the TextStream Object Maple Shade NJ
- Working with the TextStream Object Maplewood NJ
- Working with the TextStream Object Marlboro NJ
- Working with the TextStream Object Marlton NJ
- Working with the TextStream Object Matawan NJ
- Working with the TextStream Object Mays Landing NJ
- Working with the TextStream Object Medford NJ
- Working with the TextStream Object Merchantville NJ
- Working with the TextStream Object Metuchen NJ
- Working with the TextStream Object Middletown NJ
- Working with the TextStream Object Millville NJ
- Working with the TextStream Object Monroe Township NJ
- Working with the TextStream Object Montclair NJ
- Working with the TextStream Object Moorestown NJ
- Working with the TextStream Object Morganville NJ
- Working with the TextStream Object Morris Plains NJ
- Working with the TextStream Object Morristown NJ
- Working with the TextStream Object Mount Holly NJ
- Working with the TextStream Object Mount Laurel NJ
- Working with the TextStream Object Neptune NJ
- Working with the TextStream Object New Brunswick NJ
- Working with the TextStream Object Newark NJ
- Working with the TextStream Object Newton NJ
- Working with the TextStream Object North Arlington NJ
- Working with the TextStream Object North Bergen NJ
- Working with the TextStream Object North Brunswick NJ
- Working with the TextStream Object Nutley NJ
- Working with the TextStream Object Ocean City NJ
- Working with the TextStream Object Old Bridge NJ
- Working with the TextStream Object Orange NJ
- Working with the TextStream Object Palisades Park NJ
- Working with the TextStream Object Paramus NJ
- Working with the TextStream Object Parlin NJ
- Working with the TextStream Object Parsippany NJ
- Working with the TextStream Object Passaic NJ
- Working with the TextStream Object Paterson NJ
- Working with the TextStream Object Pennsauken NJ
- Working with the TextStream Object Perth Amboy NJ
- Working with the TextStream Object Phillipsburg NJ
- Working with the TextStream Object Piscataway NJ
- Working with the TextStream Object Plainfield NJ
- Working with the TextStream Object Plainsboro NJ
- Working with the TextStream Object Pleasantville NJ
- Working with the TextStream Object Point Pleasant Beach NJ
- Working with the TextStream Object Princeton Junction NJ
- Working with the TextStream Object Princeton NJ
- Working with the TextStream Object Rahway NJ
- Working with the TextStream Object Ramsey NJ
- Working with the TextStream Object Red Bank NJ
- Working with the TextStream Object Rockaway NJ
- Working with the TextStream Object Rutherford NJ
- Working with the TextStream Object Sayreville NJ
- Working with the TextStream Object Scotch Plains NJ
- Working with the TextStream Object Secaucus NJ
- Working with the TextStream Object Sewell NJ
- Working with the TextStream Object Sicklerville NJ
- Working with the TextStream Object Somerset NJ
- Working with the TextStream Object Somerville NJ
- Working with the TextStream Object South Amboy NJ
- Working with the TextStream Object South Orange NJ
- Working with the TextStream Object South Plainfield NJ
- Working with the TextStream Object South River NJ
- Working with the TextStream Object Summit NJ
- Working with the TextStream Object Teaneck NJ
- Working with the TextStream Object Toms River NJ
- Working with the TextStream Object Trenton NJ
- Working with the TextStream Object Tuckerton NJ
- Working with the TextStream Object Union City NJ
- Working with the TextStream Object Union NJ
- Working with the TextStream Object Vincentown NJ
- Working with the TextStream Object Vineland NJ
- Working with the TextStream Object Voorhees NJ
- Working with the TextStream Object Wayne NJ
- Working with the TextStream Object West Milford NJ
- Working with the TextStream Object West New York NJ
- Working with the TextStream Object West Orange NJ
- Working with the TextStream Object Westfield NJ
- Working with the TextStream Object Westwood NJ
- Working with the TextStream Object Williamstown NJ
- Working with the TextStream Object Willingboro NJ
- Working with the TextStream Object Wyckoff NJ

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML