View Full Version : Download asp file
09-26-2005, 06:42 PM
I want to give the users an option to download to their computer ASP file that is existing in my server, is it possible?
09-26-2005, 07:11 PM
Sure is and this is how you do it.
You have a link on the page that you want them to be able to DL and send the URL to another page. Such as if your page was 'somepage.asp' you would have a link called 'downloadasp.asp?ref=somepage.asp'. 'downloadasp.asp' would then read the contents of 'somepage.asp' and spit it all to the screen. 'download.asp' would have to have its headers changed so that it sent back a text file but I am sure this will be easy for you to figure out :)
09-26-2005, 07:33 PM
Humm.. I didn't understand.. what i'm suppose to do?!
There isn't any code that do it?
09-26-2005, 07:50 PM
I am sure some one else will write the code for you. I will/can not. Number one I am busy and number two I have classes tonight, therefore I have no time.
09-27-2005, 01:49 AM
From what I understand your just trying to allow people to view a ASP page's source code. Here is a page explaining how to do that: http://www.asp101.com/samples/source.asp
09-27-2005, 01:30 PM
1. Open ASP file in Notepad
2. Save as filename.txt
3. Upload to server
4. <a href="filename.txt">clicky</a>
09-27-2005, 02:04 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.