Connecting Tech Pros Worldwide Forums | Help | Site Map

Uploading Images On C# Windows Forms

Newbie
 
Join Date: Aug 2009
Location: Pretoria SA
Posts: 16
#1: Sep 17 '09
Hi there...
I've been asked to to create an application, where images on the hard-drive, can be uploaded on my C# windows form, and get stored in a database.
How do I do this?

Expert
 
Join Date: Jun 2008
Location: Pretoria, South Africa
Posts: 410
#2: Sep 17 '09

re: Uploading Images On C# Windows Forms


You need to explain which particular aspect of the application you are struggling with and post the relevant code. There is no way we can help you without you specifying what the exact problem is...
Newbie
 
Join Date: Aug 2009
Location: Pretoria SA
Posts: 16
#3: Sep 17 '09

re: Uploading Images On C# Windows Forms


OK, I have picturebox control on my form, and what I need is offer the user the option to upload a picture on this picturebox control, which will the be save in a database... This is the best way I can ask my question. Will you be able to help?
Expert
 
Join Date: Jun 2008
Location: Pretoria, South Africa
Posts: 410
#4: Sep 17 '09

re: Uploading Images On C# Windows Forms


Look at the FileStream Class. Using this class you can serialize the image and save that stream to the DB.
The datatype used in your DB will depend on the DB technology and version which you are using.
Reply