Opening FIle using ASP

Results 1 to 4 of 4

Thread: Opening FIle using ASP

  1. #1
    Nair Guest

    Default Opening FIle using ASP

    Can i open a text file and read its content using an ASP page <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Opening FIle using ASP

    Use the file system Object

  3. #3
    Join Date
    Dec 1969

    Default R&D FileSystemObject... <eop>


  4. #4
    Rob Guest

    Default RE: Opening FIle using ASP

    Yes, you need to use the FileSystemObject<BR><BR>As a simple example:<BR><BR>Dim objFSO, objTXT, File<BR><BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>If objFSO.FileExists("c: est.txt") Then<BR> Set objTXT = objFSO.OpenTextFile(FileName, ForReading, False)<BR><BR> Response.Write vbNewLine & "&#060;P&#062;" & objTXT.ReadAll & "&#060;/P"&#062;<BR><BR> Set objTXT = Nothing<BR>End If<BR>Set objFSO = Nothing<BR><BR>Prolly best read some 4guys articles on the subject

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts