0 Replies - 838 Views - Last Post: 24 January 2014 - 01:34 AM Rate Topic: -----

#1 ki2ka  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 28-August 12

How do you get the byte value of an Image control?

Posted 24 January 2014 - 01:34 AM

I have an Asp.net web site with a webcam.
The image control in the site is filled from the webcam snapshot.(which is saved in Images folder)
Now,i want to convert that image into byte(s) so that i can save it in the database.

In Windows Form application , we have PictureBox1.BackGroundImage.
MemoryStream ms = new MemoryStream();
PictureBox1.BackgroundImage.Save(ms, PictureBox1.BackgroundImage.RawFormat);
byte[] data = ms.GetBuffer();

So what is its equivalent for WebSite Image control?

Do we have to specify the path?
Thanks.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1