Welcome to WebmasterWorld Guest from 54.196.232.162

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

a href problem

     
12:42 pm on Sep 24, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


Iam trying to link a record from database and making it into a link:

<a href="<%=(rs_images.Fields.Item("filename"))%>"><%=(rs_images.Fields.Item("filename").Value)%></a>

when i run the page the file name wont come up?

why is that and how do i create a proper link.

12:46 pm on Sept 24, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Does the database record have the file extension (eg .html)?

If not you will need to add that....

12:48 pm on Sept 24, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


No its actually a file.

Like
file name
text.txt (link)
new document.doc (link)

5:38 am on Sept 25, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:May 22, 2003
posts:61
votes: 0


If you can capture the filename with the FileSystemObject you can create a variable for the name and perhaps use that in your link.

MyFile = File.Name
<a href="<%=MyFile%>">MyFile</a>