faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

13 of 30 people (43%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I include a dynamic file in my Asp page?

Jun 16th, 2000 06:06
unknown unknown, Muhammed Mustafa


What you can do:
 
<%
File=YourPath
Call ReadDisplayFile(File)
%> 

<%
SUB ReadDisplayFile(FileToRead)
   whichfile=server.mappath(FileToRead)
   Set fs = CreateObject("Scripting.FileSystemObject")
   Set thisfile = fs.OpenTextFile(whichfile, 1, False)
   tempSTR=thisfile.readall
   response.write tempSTR
   thisfile.Close
   set thisfile=nothing
   set fs=nothing
END SUB
%>



© 1999-2004 Synop Pty Ltd