Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on a file uploading functionality using ASP.NET, C# and telerik. I am using telerik:RadAsyncUpload control. I already convert the file to byte array and save in the SQLServer Database.
On update page, I need to open file directly(from the binary data saved in db), when I will click a link. I need to Open that file in separate browser tab/window. I do not want to save file Physically on any local drive while retrieving it.

Please help me out.

What I have tried:

For time been, I am saving that binary data in a blank file located at some local drive and then attaching it to that link. but I do not want to save file Physically on any local drive while retrieving it. I want .....when user will click link binary data will directly flush on separate browser tab and he can view the file.
Posted
Updated 1-Mar-16 1:54am
Comments
Sinisa Hajnal 1-Mar-16 3:03am    
Write the service (or just the page) that will accept the link, access the database based on some identifier contained in the link (maybe row primary key or something) and send binary (file) stream to the client (via response.write).

1 solution

You want to use Response.Binary write. If you google that you'll see lots of examples. For example, c# - Reading a binary file and using Response.BinaryWrite() - Stack Overflow[^]
 
Share this answer
 

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