Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2003-10-29
6
Medium Priority
?
251 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
4 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

810 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