how to convert WebControls.Image to a byte[] to store in DB?

  • Thread starter Thread starter Jim Hammond
  • Start date Start date
J

Jim Hammond

Is there any way to convert a System.Web.UI.WebControls.Image to byte[] so
that the image can be stored in a DB?

Thanks,

Jim
 
If it's on the same server, you are running the app, you could use
FileStream for example. If on another server, request it from the server and
read with BinaryReader.
 
Thanks, but the image is not in a file. It came from the client, and only
exists on the server as a System.Web.UI.WebControls.Image control.

Jim

If it's on the same server, you are running the app, you could use
FileStream for example. If on another server, request it from the server and
read with BinaryReader.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top