473,414 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 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 5501
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.