AllExperts > Experts 
Search      

Active Server Pages Programming (ASP)

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Ashley Brazier
Expertise
Main focus is ASP, SQL Server 2000 & 2005

Experience
Over 6 years experience.

Education/Credentials
BCs Honours Software Design and Networks

 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > hyperlink to open a disk file

Topic: Active Server Pages Programming (ASP)



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?

ANSWER: Hi,

Can you not reference it as a link ie http://nameofsite/nameofile.xls
Thanks

---------- FOLLOW-UP ----------

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


ANSWER: Try this:-
<html>
<head>
  <title>Untitled Page</title>
</head>
<body>


<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.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.