Aug 5, 2002 #1 dionisox Technical User May 3, 2002 10 IT Is it possible to force the download of a HTML file (download window) clicking on a link instead of opening the file in the browser window? Thanks
Is it possible to force the download of a HTML file (download window) clicking on a link instead of opening the file in the browser window? Thanks
Aug 5, 2002 #2 snowboardr Programmer Feb 22, 2002 1,401 PH <% Dim Stream Dim Contents Dim FileName FileName = "file_name.html" Response.ContentType = "application/octet-stream" Response.AddHeader "content-disposition", "attachment; filename=" & FileName Set Stream = server.CreateObject("ADODB.Stream" Stream.Open Stream.LoadFromFile Server.MapPath(FileName) Contents = Stream.ReadText Response.BinaryWrite Contents Stream.Close Set Stream = Nothing %> www.vzio.com if I helped. Upvote 0 Downvote
<% Dim Stream Dim Contents Dim FileName FileName = "file_name.html" Response.ContentType = "application/octet-stream" Response.AddHeader "content-disposition", "attachment; filename=" & FileName Set Stream = server.CreateObject("ADODB.Stream" Stream.Open Stream.LoadFromFile Server.MapPath(FileName) Contents = Stream.ReadText Response.BinaryWrite Contents Stream.Close Set Stream = Nothing %> www.vzio.com if I helped.