Groups | Blog | Home
all groups > asp.net caching > october 2005 >

asp.net caching : streaming random filetypes from .aspx


Daniel
10/20/2005 12:31:34 PM
streaming random filetypes from .aspx

how to stream a file from inside a .aspx? e.g. so one could go
href="./foo.aspx?file=bar.mp3" or href="./foo.aspx?foo.dat" etc. preferabley
i would like all file types to open with "save as" when href clicked

Brock Allen
10/24/2005 8:53:07 AM
Yes, just do Response.Write or Response.BinaryWrite and then set the Response.ContentType
and perhaps the Content-Disposition headers, then call Response.End. Oh and
if you really want streaming, then set Response.BufferingOutput = false.
-Brock
DevelopMentor
http://staff.develop.com/ballen

[quoted text, click to view]

AddThis Social Bookmark Button