Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey all

i want to upload different files extensions and display it and downloading
Posted
Comments
Samarjeet Singh Tomar 16-May-11 15:04pm    
There are project already with Code Project kindly search.

1 solution

Display it means display the link or the file content?

If display content then.....
"different files extensions and display" Depends on your browser compatibility to display that file extension. File upload has a property FileContent, which is a stream. That stream can be channeled to a response stream of the same page or a different page. Channelize to a different page is little tricky, alternatively you can save the file and store the path in the session. If different page then page can be called through a IFrame which initialize a context for the page and at the page_load you can get the session variable, read the file in the stream and send it to the response stream. You need to define the content type on the header too.

If display the link then simply add the virtual path of the saved file to a hyper link
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-May-11 22:11pm    
Right, a 5.
--SA
Albin Abel 17-May-11 5:04am    
Thanks SAKryukov
Albin Abel 17-May-11 5:05am    
Thanks shms_rony

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900