Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,
I have joined a new company..In middle of my first task I have to retrieve logo Image from SQL and display it on aspx page.

Problem is all "the column in which the image supposed to store had data like 0X08366474888429... looks like binary data. and that column data type is varBinary(MAX)"

When I try to run query like "select img from fdg" data coming to my aspx page is "system.byte[]"...I am not even getting raw value.. if I run query in sql it is giving me raw value...

because I am getting this image data part of a table and binding it to a repeater
<#Eval(img)%>.. I am getting only type info..system.byte[]

How can I get raw value and how to parse that raw value to Img to display??

Thanks.. a lot
Posted

Take a look at this Code Project Q/A To display binary formatted image from database[^]

EDITED

Please refer Mapping CLR Parameter Data[^]
 
Share this answer
 
v2
Thanks for your prompt response..

My question is why I am only getting type info such as system.byte[].. instead of raw binary value... how can I get binary value???
when I run query result showing binary value.. but when I execute stored procedure it only returning system.byte[] in image column...???
 
Share this answer
 
Comments
Wonde Tadesse 29-Jun-11 22:48pm    
Answer Updated.

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