all groups > inetserver asp components > april 2005 >
You're in the

inetserver asp components

group:

How to navigate...


How to navigate... Dusan
4/12/2005 9:37:07 AM
inetserver asp components: Hi

My problem is probably simple. But I do not know, how to obtain directory
from a client, to store a downloaded file.
I mean, client can to point directory in his PC (something like SaveDialog
in Windows.Forms), where a WebClient can send a file.
Is there any component, to solve this problem?

Thanks

Re: How to navigate... Dusan
4/12/2005 11:31:04 PM
Thank You Jason

There is HTML componet <input type="file"/> which put on the page button
"Browse" , to enable user populate his FileSystem to select a file. But this
is suitable only for file uploading .
I ment, there must be something similar for DownLoad file...

Dusan

[quoted text, click to view]
Re: How to navigate... Jason Brown [MSFT]
4/13/2005 12:00:00 AM
You can't specify this. it's up to the user where the file gets saved. Or is
that not what you mean? Might be a clkash of terminology here



--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Re: How to navigate... Jason Brown [MSFT]
4/13/2005 5:23:14 PM
You can cause the browser to show the 'save as' dialog pretty easily by
sending a content-disposition header

Response.AddHeader("content-disposition",
"attachment;filename=somefile.extn")
and/or making sure you send a mime-type the browser won't want to display by
itself
Response.ContentType = "application/unknown"


but you can't specify where the user will put it.


--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.


[quoted text, click to view]

Re: How to navigate... Dusan
4/16/2005 3:16:03 AM
Jason

Your example works well, but this only can send entire page. I would need to
send a file, saved in app. directory (likes zip,rar file).
I mean, I would like to allow a client do download a file from main domain.
What kind of parameters shoul I put in AppenHeader sub.
Response.AppendHeader(string name?,string value?);

Thank You

Dusan



[quoted text, click to view]
Re: How to navigate... Jason Brown [MSFT]
4/19/2005 12:00:00 AM
well, a file like that wouldn't be processed by the ASP engine by default,
so you'd have to open the file from ASP, then stream it. A quick Google
turned this up:

http://rtfm.atrax.co.uk/infinitemonkeys/articles/asp/934.asp



--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.




[quoted text, click to view]


Re: How to navigate... Dusan
4/25/2005 2:39:03 AM
Jason

Thank You for the link.

[quoted text, click to view]
AddThis Social Bookmark Button