Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP and ZIP

Posted on 1999-07-26
10
Medium Priority
?
186 Views
Last Modified: 2013-12-25
How can I send a zip file (as a MIME message) to a browser in ASP ?

Andrew
0
Comment
Question by:andrewyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 30 total points
ID: 1835214
<%
Response.ContentType = "application/zip"
Response.Buffer = TRUE
%>
0
 

Author Comment

by:andrewyu
ID: 1835215
Thanks, but, how can I send the message to the browser ?

Andrew
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1835216
What do you mean by "message"?
0
Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

 

Author Comment

by:andrewyu
ID: 1835217
Message = ZIP FILE

Andrew
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1835218
YOu want to send the Zip file through the browser correct?  Simply put that at the top of the page and it will send the ZIP file
0
 

Author Comment

by:andrewyu
ID: 1835219
Yes, I would like to send a ZIPed file to browser as a MIME types message through ASP ! How can I do it ?

Andrew
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1835220
Place this:

 
Accepted Answer
From: MasseyM Date: Monday, July 26 1999 - 11:37AM EDT  
 
<%
Response.ContentType = "application/zip"
Response.Buffer = TRUE
%>
 
 
before you send anything to the browser...
0
 

Author Comment

by:andrewyu
ID: 1835221
<%
Response.ContentType = "application/zip"
Response.Buffer = TRUE
%>

It think it is ok !

BUT, how can I send the file ?
Let's say, the file is retrieve from database and store in rs("zipfile") !

Andrew
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1835222
OK... Let me get this straight..

YOu have ZIP files in your database and you want to send a zip file from the DB to the browser when someone click on a link?  Correct?

If so, do this:

in your main page.asp
<A HREF="sendzip.asp?DatabaseID=12">azipfile.zip</A>


then in
sendzip.asp
---------------
<%
Response.ContentType = "application/zip"
Response.Buffer = TRUE

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "yourDSN", "", ""
Set RS = server.createobject("ADODB.RecordSet")
RS.Open "SELECT * FROM Table WHERE ID=" & Request("DatabaseID") & ";", Conn, 3, 3
response.Write RS("ZipFile")
RS.Close
Set Rs = nothing
Conn.Close
Set conn = nothing
%>
0
 

Author Comment

by:andrewyu
ID: 1835223
Thank you very much !

Andrew
0

Featured Post

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question