Click here to Skip to main content
14,391,415 members
Rate this:
Please Sign up or sign in to vote.
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 !!

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100