Making a content downloaded...

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/68724?pagenum=1
05 November 2025, 02:12

Topic


SiSL
Making a content downloaded...
22 June 2009, 13:37


Greetings,

I want to ask a question that bugs my mind for long time...
My ASP file named, "test.asp" is this:

<%
myText = "<strong>Hello World</strong>"
Response.Write myText
%>

Can I make this ASP file act like a fake file like "x.html" and open "Download" dialog without writing this to a text file on server? Basically upload from memory?

 

Replies ...


AnonJr
22 June 2009, 14:08


You can, I just forget the particulars. I had looked it up a long while back for an old project.
SiSL
22 June 2009, 14:46


I would love to hear if there is a way :)
Shaggy
23 June 2009, 04:23


Add the following to the start of your file:
Code:
response.contenttype="text/html"
response.addheader "content-disposition","attachment;filename=file.html"
SiSL
23 June 2009, 11:25


Thank you SOOO MUCH :)
Shaggy
24 June 2009, 04:25


No worries smile
© 2000-2021 Snitz™ Communications