Results 1 to 2 of 2

Thread: dynamic active server pages

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Posts
    110

    Question

    I am more of a vb programmer than an asp programmer so please try to bear with me. I am trying to create a singal webpage that can open a text file and put the contents of the file onto the webpage. Maybe I could make it so like textreader.asp#info.txt would open info.txt and put that text file in the page. My use for this is to simply make my numerous text files look a little bit nicer. Please email me at [email protected] or post a reply if you can help.

  2. #2
    Lively Member
    Join Date
    Sep 1999
    Location
    Somerset, UK
    Posts
    93

    Thumbs up Is this any help??

    To insert the contents of a textfile into a td, paste this into your <td>
    <%
    ForReading = 1
    FileName = Server.MapPath("/robots.txt")
    Set objFile = Server.CreateObject("Scripting.FileSystemObject")
    Set objCoun = objFile.OpenTextFile(FileName, ForReading)
    Response.Write objCoun.ReadAll
    objCoun.Close
    %>

Posting Permissions

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



Click Here to Expand Forum to Full Width