Solved

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

Posted on 2003-10-29
6
244 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
selectSingleNode in Access 2013 11 58
MVC and Angular 2 102
Problem to echo 6 95
Make Line Items Look Good Over Mobile 2 54
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

786 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