Click here to Skip to main content
16,018,417 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can be insert pdf file in database directly without use file upload control .
pdf file already save in C:drive !
Please Give mi help !!
Posted

1 solution

Depends on where the C: drive is.

If it is on your Server, then it is easy: just read the file as a stream of bytes (use File.ReadAllBytes) and write it to the database using a parametrised query.

If it is on the client, then you can't - you have to use an upload control to transfer it to the server first.
 
Share this answer
 
Comments
Ganesh Gavhale 26-Jul-12 3:09am    
Thank you !
OriginalGriff 26-Jul-12 3:12am    
You're welcome!

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