TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anuradha Chavan
NA
37
16.2k
How to save uploaded image data back to computer?
Feb 14 2014 6:12 AM
Hello Friends,
I am working on a windows application that will store customer data along with image,
I have done the part of uploading a image. Now I want to write a code that will work as like download link in web applications.
How to save uploaded image data back to computer?
Here is code i used for upload
private void btnUpload_Click(object sender, EventArgs e)
{
try
{
string str = ConfigurationManager.ConnectionStrings["MySampleDBConnectionString"].ConnectionString.ToString();
SqlConnection con = new SqlConnection(str);
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpeg;*.bmp;*.png;*.jpg)|*.jpeg;*.bmp;*.png;*.jpg";
if (open.ShowDialog() == DialogResult.OK)
{
txbImg.Text = open.FileName;
pictureBox1.Image = new Bitmap(open.FileName);
}
btnSave.Visible = true;
}
catch (Exception ex)
{
MessageBox.Show("Error" + ex.Message.ToString());
}
How to get it back and save to computer?
Reply
Answers (
0
)
Email-Regular Expression
Insert or Update checked rows only in sql server 2008 table