|
 |
asp_web_howto thread: downloads
Message #1 by "Carlos Lamar" <lamar@s...> on Wed, 24 Jul 2002 08:32:24 -0700
|
|
Good morning,
How can I give a user the option to save the results of an SQL query to
their PC. Currently, I generated a report which shows all the fields on
the screen, however, I need to allow users to download the data as an
ASCII delimited file...
Your help will be greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
Message #2 by "Ravikumar Gurrapu" <mail2grk@y...> on Wed, 24 Jul 2002 17:50:28
|
|
Hi
Try this.
Dowload.asp :
=============
<%
Response.ContentType = "application/x-csv"
Response.AddHeader "content-disposition"," filename=Result.csv"
Response.write "Field1,Field2,Field3"
Response.write vbNewLine
Response.write "Data1,Data2,Data3"
%>
Call this Download.asp when you click Download button in popup window
(using window.open).
Thanks
Ravi
> Good morning,
How can I give a user the option to save the results of an SQL query to
their PC. Currently, I generated a report which shows all the fields on
the screen, however, I need to allow users to download the data as an
ASCII delimited file...
Your help will be greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
Message #3 by "Carlos Lamar" <lamar@s...> on Wed, 24 Jul 2002 13:17:46 -0700
|
|
Good morning,
How can I give a user the option to save the results of an SQL query to
their PC. Currently, I generated a report which shows all the fields on
the screen, however, I need to allow users to download the data as an
ASCII delimited file...
Your help will be greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
Message #4 by Vijay G <happygv@y...> on Wed, 24 Jul 2002 13:38:39 -0700 (PDT)
|
|
You can either use FileSystemObject to write them to a CSV file simultaneously by the time you loop thru the dataset to display on
the Screen, or Use BCP command of SQL(if you use MS SQL). And then provide a link to that CSV file on the same page so that the user
can download using right click on it and choose "save target as" to save it to his locak disk.
Hope this helps
-----------------------
Vijay.G - EFI
Carlos Lamar wrote:Good morning,
How can I give a user the option to save the results of an SQL query to their PC. Currently, I generated a report which shows all
the fields on the screen, however, I need to allow users to download the data as an ASCII delimited file...
Your help will be greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---------------------------------
Do You Yahoo!?
Yahoo! Health - Feel better, live better
Message #5 by "Carlos Lamar" <lamar@s...> on Thu, 25 Jul 2002 07:55:05 -0700
|
|
Thanks, Vijay... this works fine!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
> ----------
> From: Vijay G[SMTP:happygv@y...]
> Reply To: ASP Web HowTo
> Sent: Wednesday, July 24, 2002 1:38 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] Re: downloads
>
>
> You can either use FileSystemObject to write them to a CSV file
simultaneously by the time you loop thru the dataset to display on the
Screen, or Use BCP command of SQL(if you use MS SQL). And then provide a
link to that CSV file on the same page so that the user can download
using right click on it and choose "save target as" to save it to his
locak disk.
> Hope this helps
> -----------------------
> Vijay.G - EFI
>
> Carlos Lamar wrote:Good morning,
>
> How can I give a user the option to save the results of an SQL query
to their PC. Currently, I generated a report which shows all the fields
on the screen, however, I need to allow users to download the data as an
ASCII delimited file...
>
> Your help will be greatly appreciated.
> Thanks!
> ---Carlos
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *: xxx.xxx.xxxx
> > *: xxx.xxx.xxxx (FAX)
> > *: clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
> r-20
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
> r-20
>
|
|
 |