Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow user to download files

Status
Not open for further replies.

SpeedBWild

Programmer
Apr 29, 2004
117
US
I am trying to setup a web page that allows users to download any file that is listed.
I check the extension so I can set the response.contenttype, but it doesn't seem to matter.

I found an example online that said I should set the response.header and response.Contenttype, any ideas?


 
You need to tell the client what type of content u r going to send so that that client will prepare appropriate program to pick up the file and show

 
You have a few options:

a. Keep it simple and have your list contain links to actual files, perhaps on an ftp site (though not necessarily).

b. Have a file server page which is completely blank except for the Page directive. Have the file server page set the content type and write the file to the response stream (via Response.WriteFile()).

c. This gives a pretty good example:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top