PDA

View Full Version : Hyperlink to file on network


tottiescones
09-20-2004, 10:52 AM
Hi all

I am new to ASP and need help. I have coding that displays the files from a folder and are hyperlinked. The problem is that when I click on the file name I would like it to open the file. Instead it is just giving me "page cannot be displayed". The code for the folder is:

strPath = "E:\documents\Manual\"

And for the hyperlinks:

For Each objItem In objFolder.Files
%>
<TR BGCOLOR="#CCFFCC">
<TD ALIGN="left" ><%= ShowImageForType(objItem.Name) %>&nbsp;<A HREF="<%= strPath & objItem.Name %>"><%= objItem.Name %></A></TD>
<TD ALIGN="right"><%= objItem.Size %></TD>
<TD ALIGN="left" ><%= objItem.DateCreated %></TD>
<TD ALIGN="left" ><%= objItem.Type %></TD>
</TR>
<%
Next

The problem is that I want the hyperlink to go to
E:\documents\Manual\file
Not
file:///E:/documents/Manual/file
Which is what it is trying to do.

Hope this makes sense to someone.

Tottiescones