Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello Friends

I want to retrieve image data from sql server to aspx page .
In my aspx page i m using a image control and I want this image on this image control. I m saving image in sql server but i can't retrieve it into my image control. I m also using file upload control in my application.

Pls Help me out
Posted

In a separate aspx file code behind..
Get the blob from your database. If you stored the data as base64 string then use the Convert.FromBase64String method. It will give you the byte array. Wrap this array in to a binary stream and write to the Response's output stream.

Set the image url for the image control this aspx page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900