[thelist] ulradev dynamic text ASP help - repost

dn at dittodesign.co.uk dn at dittodesign.co.uk
Fri Jun 21 07:41:01 CDT 2002


Posted yesterday but with no replies so I thought
I'd try again. Apologies if you've read this already.
_________________

I'm trying to get text files to load dynamically
from a path entered in the database. In a similar
fashion to the dynamic image path routine.

I have a server behaviour that reads a text file
but still requires a manual insertion of the path.

I'm not an ASPer but figure the Fields.Item in
the dynamic image I have set up should do it.

<img src="<%=(rscomp.Fields.Item("Image1").Value)%>"

the code for the text file link reads -

<%
PhysicalPath=Server.MapPath("companies/keysolve/text1.txt")
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
Set MyTextFile=MyFileObject.OpenTextFile(PhysicalPath)
WHILE NOT MyTextFile.AtEndOfStream
Response.Write(MyTextFile.ReadLine)
WEND
MyTextFile.Close
%>

I presume inserting this
rscomp.Fields.Item("Description").Value

where rscomp is the recordset and description holds the text file
link, between the ( ) below would be on the right track.

PhysicalPath=Server.MapPath("companies/keysolve/text1.txt")

Is Value necessary ? To save me sweating over it for an hour or
so could somebody please let me know the syntax or if I'm off track
with this one.

tia,

Darren




More information about the thelist mailing list