[thelist] Fw: ulradev dynamic text ASP help
dn at dittodesign.co.uk
dn at dittodesign.co.uk
Thu Jun 20 13:46:01 CDT 2002
--
[ Picked text/plain from multipart/alternative ]
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, in to 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