Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

758 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

22 Experts available now in Live!

Get 1:1 Help Now