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
>