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

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
 
T

Teemu Keiski

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.
 
J

Jim Hammond

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top