472,780 Members | 4,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

"Save As" dialog???

Hi

I'm new to ASP/Web programming so any help would be appreciated...

Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. When the user clicks to start the download I would like to display the "Save As" dialog, allow the user to name a place to save the file, and then show the download progress bar while the file downloads

Question:

How do I make a windows "Save As" dialog appear when the user clicks on a link {or button} to download a large file? I've been looking at source for several web pages that do this and I think they use J-Script - does this make sense? How do I share data between the web page and the "Save As" dialog so that I can seed the dialog with a default filename and location

As I said I'm new to ASP.NET programming so I don't know where to start; any direction would be useful..

--Richar

Nov 18 '05 #1
4 5404
Richard,

Why would you want to go through all this trouble to reinvent the wheel?
There is already functionality you are looking for, which is built in all
Web browsers. Or are you simply asking how to allow users download a file
using the standard browser-implemented functionality? In the latter case, if
the file to be downloaded has a standard extension (e.g. zip), any link to
this file (either static or programmatic) will cause the "Save As" dialog to
pop up. If you want to display the "Save As" dialog and allow the users to
download files, which would normally be displayed in the browser window
(e.g. XML), or if you want to generate the contents of the file on the fly,
it can be done as well with a couple of lines of code.

Alek

"Richard" <an*******@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
Hi,

I'm new to ASP/Web programming so any help would be appreciated...

Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. When the user clicks to
start the download I would like to display the "Save As" dialog, allow the
user to name a place to save the file, and then show the download progress
bar while the file downloads.
Question:

How do I make a windows "Save As" dialog appear when the user clicks on a link {or button} to download a large file? I've been looking at source for
several web pages that do this and I think they use J-Script - does this
make sense? How do I share data between the web page and the "Save As"
dialog so that I can seed the dialog with a default filename and location?
As I said I'm new to ASP.NET programming so I don't know where to start; any direction would be useful...
--Richard

Nov 18 '05 #2
Hi
Why would you want to go through all this trouble to reinvent the wheel
There is already functionality you are looking for, which is built in al
Web browsers.

Not trying to reinvent the wheel --> I know that browsers can do it I just dunno how to make a browser do it or what the "theory of operation" is. From the source that I've looked at it appears that I need JScript - Is this correct
If you want to display the "Save As" dialog and allow the users t
download files, which would normally be displayed in the browser windo
(e.g. XML), or if you want to generate the contents of the file on the fly
it can be done as well with a couple of lines of code

Ahhh yes and what might that code look like? Is it J-Script? VB-Script? Am I displaying a Windows common dialog box, some kind of control provided by the browser? Or something that JScript provides? I dunno where to start here..

--Richar
"Richard" <an*******@discussions.microsoft.com> wrote in messag
news:D6**********************************@microsof t.com.. Hi
I'm new to ASP/Web programming so any help would be appreciated..
Situation: On my web page I would like to present a link {or button} tha would allow the user to download a large file. When the user clicks t
start the download I would like to display the "Save As" dialog, allow th
user to name a place to save the file, and then show the download progres
bar while the file downloads Question
How do I make a windows "Save As" dialog appear when the user clicks on link {or button} to download a large file? I've been looking at source fo
several web pages that do this and I think they use J-Script - does thi
make sense? How do I share data between the web page and the "Save As
dialog so that I can seed the dialog with a default filename and location As I said I'm new to ASP.NET programming so I don't know where to start any direction would be useful.. --Richar

Nov 18 '05 #3
No, no, I think it is more simple than you think. You do not need to build
any controls or dialogs, because they are all built into the browser. It is
unlikely that you need to implement any JavaScript, at least in the sense
you may have (like making JavaScript display the prompts or whatever). Now,
depending on how exactly you want to do it depends on what you want to do.
In the most trivial case, you do not even need to do anything. For example,
if you display a link to file by clicking which the user should be prompted
to save it, assuming that the file has a proper MIME type (i.e. MIME type
indicating to the browser that the proper action would be a download, such
as EXE, ZIP, MSI, CHM, etc), then you do not need any coding. The user will
get the "Save As" prompt automatically. Now, let's say that you want to use
a button instead of the link. In this case, there may be different options
which may require either client-side or code-behind programming, but the
goal of either option would be to point the user (browser) to the URL of
your file. As I said before, if your file has a MIME type, which does not
cause the "Save As" dialog to pop up, you may need to add some code (not a
lot) to override the default browser behavior. I do not have any samples at
hand now, but if this is what you are looking for, please reply to this
post, and I will try to find something (probably tomorrow, as I am about to
leave). Or maybe someone else can do it before me.

Alek

"Richard" <an*******@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
Hi,
Why would you want to go through all this trouble to reinvent the wheel?
There is already functionality you are looking for, which is built in all
Web browsers.

Not trying to reinvent the wheel --> I know that browsers can do it I just

dunno how to make a browser do it or what the "theory of operation" is.
From the source that I've looked at it appears that I need JScript - Is this
correct?
If you want to display the "Save As" dialog and allow the users to
download files, which would normally be displayed in the browser window
(e.g. XML), or if you want to generate the contents of the file on the fly,
it can be done as well with a couple of lines of code.

Ahhh yes and what might that code look like? Is it J-Script? VB-Script?

Am I displaying a Windows common dialog box, some kind of control provided
by the browser? Or something that JScript provides? I dunno where to start
here...
--Richard
"Richard" <an*******@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
> Hi,
>> I'm new to ASP/Web programming so any help would be appreciated...
>> Situation: On my web page I would like to present a link {or button} that
would allow the user to download a large file. When the user clicks to start the download I would like to display the "Save As" dialog, allow the user to name a place to save the file, and then show the download progress bar while the file downloads. >> Question:
>> How do I make a windows "Save As" dialog appear when the user
clicks on a
link {or button} to download a large file? I've been looking at source for several web pages that do this and I think they use J-Script - does this make sense? How do I share data between the web page and the "Save As" dialog so that I can seed the dialog with a default filename and location? >> As I said I'm new to ASP.NET programming so I don't know where to

start; any direction would be useful... >> --Richard

>

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: W.Guerlich | last post by:
I've got a Java servlet that delivers large database resultsets transformed to Excel with the HSSF library. In some cases it takes more than 15 minutes before transformation is done and content can...
4
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. ...
3
by: B-Dog | last post by:
I'm checking some files to see if the filenames are in a certain format and if not I want to pull up a dialog box that gives me a save as with the file that is in question. I have all the files in...
1
by: Tomas Martinez | last post by:
Hi, In my web I have a proccess of download reports which on first step generates a PDF, then flushes the buffer (the generated file) and finally deletes this file from server. Ok, the problem...
1
by: sainathparuchuri | last post by:
As a project requirement we need to convert word documents to tiff images. We have been using Microsoft Office Document Image Writer (MODI) for this puspose and doing absolutely well. But now this...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.