Click here to Skip to main content
14,664,496 members
Rate this:
Please Sign up or sign in to 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

Rate this:
Please Sign up or sign in to vote.

Solution 2

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.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100