Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
How to save uploaded image data back to computer?
Anuradha Chavan
Feb 14 2014 6:12 AM
857
Reply
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?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Email-Regular Expression
Binding dropdownlist using MVC5 and json