Solved

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

Posted on 2003-10-29
6
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

739 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