Expert: Ashley Brazier Date: 2/20/2008 Subject: hyperlink to open a disk file
Question QUESTION: In html page I can open a disk file with this code:
<a href="file:///C:/AMR2008CM/App_Data/fastopen.xls" >
In VS2005 within ASP page the followeing code does not open
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="htmllink1.aspx.vb" Inherits="htmllink1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<a href="file:///C:/AMR2008CM/App_Data/fastopen.xls" > this </a>
</div>
</form>
</body>
</html>
Ashley, Can you help me where I am making a mistake?
QUESTION: Thanks Ashley for immediate response. My module wants to access files on local network without storing the same on IIS server as these files are constantly being updated and large in numbers as well as size. Hence copying and updating them on server is not practical.
If I type that command in html - it gives me no problem at all for example this statement in html opens up from any pc on network
<html>
<body>
<a href="\\thurman\Y Drive\Reading & Billing\Bills\Sky Tower\2007\BUDGET TEMP.xls" >
Open file
</body>
</html>
Please let me know how to solve this
<a href="file:///C:/AMR2008CM/App_Data/fastopen.xls" > this </a>
</body>
</html>
save as .asp
does that work?
---------- FOLLOW-UP ----------
QUESTION: yes - but results are no different - with my pc it works fine becuase iis is on my pc but on other pcs on network browser page opens there but Excel file opens on my PC
I wonder if this has to anything with DCOMCNFG utility to be run on server as well as all the client machines.
Answer Hi,
where the files are kept you will have to set it so they are shared.
If you reference it as file file:///C:/AMR2008CM/App_Data/fastopen.xls it will check the users c drive.
If you make App_Data a sharefolder with read permissions to everyone it will work.