Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Download asp file

    Hi everybody!
    I want to give the users an option to download to their computer ASP file that is existing in my server, is it possible?

  • #2
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.

  • #3
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Humm.. I didn't understand.. what i'm suppose to do?!
    There isn't any code that do it?

  • #4
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.

  • #5
    New Coder
    Join Date
    Dec 2002
    Location
    Washington State
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


    ~Isaac~
    ~ Isaac Lloyd ~
    Website Design & Development
    http://www.IsaacLloyd.com

  • #6
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    1. Open ASP file in Notepad
    2. Save as filename.txt
    3. Upload to server
    4. <a href="filename.txt">clicky</a>

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •