Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


open a file from asp page with one click

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,1627
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> open a file from asp page with one click
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 open a file from asp page with one click - 11/21/2004 9:34:08 AM   
  wolfberg

 

Posts: 4
Score: 0
Joined: 11/21/2004
From:
Status: offline
First of all, excuse me if I sound like a fool, I am just getting started at this.

I have an .asp page which is displays a list of the contents of a windows folder. My goal is to be able to click on file name and open it up for viewing, like any other href link.

the code is currently

<tr>
<td class="TableHeader">Client Files</td>
</tr>

<%
If ClientFolderExists Then
%>
<tr>
<td class="Label">Folder: <a href="<%=ClientFolders & ClientFolder%>"> <%=ClientFolder%></a></td>
</tr>
<%
End If
%>
<tr>
<td>
<iframe height=300 frameborder=no src="ClientFiles.asp?FolderName=<%=Server.URLEncode(ClientFolders & ClientFolder)%>"></iframe>
</td>
</tr>


As the code is now, I can right click on the link, copy the link and paste it into a browser and it will open up the file. However, I want simply to be able to click on the link to open up the file.

here is a sample link which the code creates

file:///c:/inetpub/wwwroot/matis/ClientFolders/Druse,%20III,%20Frank-126/ticket%20and%20agreement.tif
 
 
Post #: 1
 
 Re: open a file from asp page with one click - 11/22/2004 9:18:11 AM   
  wils0n

 

Posts: 14
Score: 0
Joined: 10/27/2004
From:
Status: offline
Do you want people outside of your computer to be able to link to these files? So far, the link you are giving is to your computer's C drive.

Otherwise, your code should work. What happens when you just click the link now?

Check out this control: http://www.particlesoftware.com/en/

You might find it helpful in rendering IE completely insecure, yet highly functional on an Intranet. ;)

(in reply to wolfberg)
 
 
Post #: 2
 
 Re: open a file from asp page with one click - 11/23/2004 12:35:40 AM   
  wolfberg

 

Posts: 4
Score: 0
Joined: 11/21/2004
From:
Status: offline
quote:
Originally posted by wils0n


Otherwise, your code should work. What happens when you just click the link now?




1) Thanks, I will check it out. I am running intranet, so the files are only for me, so the c: drive is appropriate.

2) When I click on the link, nothing happens.

(in reply to wolfberg)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> open a file from asp page with one click Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts