خرید بک لینک

Vote count: 0

this is for inserting in database but it is not showing the image in gridview

this is for get image private void btnImage_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "c:"; openFileDialog1.Filter = "All files (.)|."; openFileDialog1.FilterIndex = 2; openFileDialog1.RestoreDirectory = true;

        if (openFileDialog1.ShowDialog() == DialogResult.OK)
        {
            try
            {
                PictureBox PictureBox1 = new PictureBox();
                PicBox.Image = new Bitmap(openFileDialog1.FileName);
                // Add the new control to its parent's controls collection
                this.Controls.Add(PicBox);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error loading image" + ex.Message);
            }
        }

    }

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 1 ارديبهشت 1395 ساعت: 17:30

صفحه بندی