Solved

Dynamic Copy from a web page using ASP, VBScript and HTML

Posted on 2003-10-29
6
243 Views
Last Modified: 2010-04-06
Advice Please and I need to figure this out quick,

What is the best way to achieve these results:  

Several Web pages have options that allow for several choices on the final submit I want the page to post to a database and copy a file to the users local machine and there is the possiblility that choices could lead to several copies.  The file we want copied to the users machine is xxxxxx.abc now the xxxxxx is decided by the choices the user made on the ASP pages and there could be multiple xxxxx.abc's

Feels like that covers the problem but please write for more info.  I am still working on my first ASP page and will likely require a longer than normal explaination.  One person I talked to said use Perl but I know squat about perl.
0
Comment
Question by:LisaD
  • 2
6 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 9648721
you can't just "copy" a file to the users machine. The user can download a file to the destination on his HD of his choice.
it's easy to understand why copying a file without the user's confirmation and interaction won't work: it would be too easy to spread around viruses.

But maybe I misunderstand your question.
0
 

Author Comment

by:LisaD
ID: 9649881
This is an intranet app and the user is made aware that their choices result in a copy or copy like action that will inturn start another process.
0
 
LVL 1

Accepted Solution

by:
Depeche_Mode earned 500 total points
ID: 9752545
Do you know the file format you are going to make the user store the file in ?

here is an example which creates a CSV File:-

<%@ Language=VBScript %>

<%

Response.ContentType = "application/csv"
Response.AddHeader "Content-Disposition", "filename=SampleCSV.csv;"


Response.write vbNewLine
Response.Write("Data Displayed is for the  2 Week of 2003 ")

%>

if you paste the above code in any asp file... and call this asp file from any other page , this page will create a CSV file titled "SampleCSV.csv" and prompt the user to save it or open it on the local machine.

The title of the file could be user given also.

The only change in the above code would be :-

"filename=" & str_filename & ";"

where str_filename is the filename specified by the user in a different page.


Hope this helps.


========================
Long Live the Penguin
========================

Cheers
******
0
 
LVL 1

Expert Comment

by:Depeche_Mode
ID: 9775200
Hi,


Please Close this question if you feel that your problem has been solved.


===============
Long Live the Penguin
===============


Cheers
******
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now