Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact






WRAPPERCLASS FOR TEXTFILES IN ASP
I will in this tutorial make a wrapperclass for textfile. I will first describe the methods and then show how you can use some of the methods by implementing the class to your project.


The Methods

The code above will give you the content of the file. I will use the rest of this tutorial to make a wrapper class for manipulation of this content. You can therefore easily implement this class to your own project and save some time writing it.
The Content of the Wrapper class:
Method Description
GetAllTextContent(filename) Gets the entire content of the filename
GetAllTextContentWithBreak(filename) Gets the entire content of the filename with text breaks
MakeFile(filename) Makes a file, if the file exists replace it with a new
ReplaceWords(filename, newword, oldword) Make the words you want for a given file
ReplaceLine(filename, linenr, content) Replace a line with the given linenr
InsertLineAfter(filename, linenr, addcontent) Inserts a line after a given linenr
InsertLineBefore(filename, linenr, addcontent) Inserts a line before a given linenr
DeleteFile(filename) Delete a filename
DeleteLine(filename, linenr) Deletes a line with a given linenr
DeleteWord(filename, word) Deletes the given words from the file



How to use the wrapper class

You access the wrapper class with a object. Below I have included the file with the wrapper class, made an object and used this to first make a new file with some text and then get the content of this file with another method. You can download the wrapper class here or view it here.


Dim obj
'make an object
Set obj = New TextFileInterface
obj.MakeFile(filename, textToFile)
'write the result the class display
Response.Write(obj.GetAllTextContentWithBreak(filename))




PROJECT DESCRIPTION
Category Programming with ASP
Author Tommy Johannessen





Ronny André Reierstad
Morrowland All rights reserved Morrowland © 2002 Apron Tutorials

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2007  
Ronny André Reierstad