Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
How to upload a file or document in C#Windows application.

Regards
Balamurugan
Posted

 
Share this answer
 
Comments
Christian Graus 25-Aug-12 11:59am    
You're a bit late to the game. His comments show he meant insert in to a DB, not upload
[no name] 25-Aug-12 12:05pm    
Can you cme to skype now i can ask u some more queries using calls
NandaKumer 25-Aug-12 12:09pm    
You can ask the qn here. That's why this site created.
Here[^] is an article on how to upload files with FTP. If you're uploading to your own website, you can write a webservice[^] instead to do the job.

Apparently, you meant to ask how to insert files in to the database. Here[^] is a Code Project article. It tells how to insert images but note, your database IMAGE type just means a binary blob ( there is also a BLOB type you can use ), and does not mean a picture, you can store any data in to that type you like, using this code.
 
Share this answer
 
v2
Comments
[no name] 25-Aug-12 11:41am    
I'm asking in windows form application..
Christian Graus 25-Aug-12 11:42am    
Yes you are, but you did not say where you want to load it to. Read my answer again. It is correct.
[no name] 25-Aug-12 11:45am    
Ya i have created the form using upload and browse option. If i'm clicking browse means it should search the valid path for document and if i'm clicking the document it should upload in the database.
Christian Graus 25-Aug-12 11:46am    
OK, so most of that is trivial. The question becomes, what did you mean by 'upload' ? Upload to where ? Is your data base on another server ? Is it on the internet ? Is it on the local network ? I answered what you asked, but now we have to work out what you MEANT to ask....
[no name] 25-Aug-12 11:48am    
Its not internet.it should upload in the database..

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