I'm calling ReadDisplayFile from within my ASP page in order to read another page and include it to the page.
It works just fine when i want to include a static HTML page. When i m calling ASP naturally it just puts the contents of ASP there without Compiling it.
Well this makes sense because this script was produced when it compiled the ReadDisplayFile.
A solution would be to SAY something RECOMPILE tempSTR
Where tempSTR is the code of the included Page
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
It works just fine when i want to include a static HTML page. When i m calling ASP naturally it just puts the contents of ASP there without Compiling it.
Well this makes sense because this script was produced when it compiled the ReadDisplayFile.
A solution would be to SAY something RECOMPILE tempSTR
Where tempSTR is the code of the included Page
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