How to download file from server !

Bạn muốn download file từ một web mà không muốn hiện đường dẫn file
thì đây là một cách để làm.

Khi run:


Code file *.aspx:


Code file *.cs

Comments

Anonymous said…
Xin chào,

Mình dùng code của bạn thử test xem được ko? nhung khi chạy, load lên và show filename trong listbox, selected 1 file name, click download thì nhận được error này ghi ra browser như vậy nè.

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

An invalid character was found in text content. Error processing resource 'http://localhost:49434/ConnorWebsite/Pages/UpDow...

Bạn biết tại sao thì chỉ giúp mình với nhé. Thanks
Anonymous said…
Ồh, đoạn code của bạn có thể down tất cả loại file khác nhau ko? chẳng hạn mình muốn down file .doc, .docx, file image vvv.vv.

Popular posts from this blog

How to search and HighLight !

What's ViewState? How does use?