This is a migrated thread and some comments may be shown as answers.

Image not showing

1 Answer 62 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Joby
Top achievements
Rank 1
Joby asked on 11 Apr 2012, 11:11 AM
Hi,
I have radrotator with RadBinaryImage.I am saving the logo in sql server using varbinary datatype.I need to bind the image inside the radrotator.For that i have given the following codes 

1. "DataValue='<%# (byte[]) DataBinder.Eval(Container.DataItem, "Airline_Logo")%>' />" 

2. "DataValue='<%# DataBinder.Eval(Container.DataItem, "Airline_Logo")%>' />".But both are not working

1 Answer, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 11 May 2012, 01:52 PM
Hello Joby,

If you using Linq, the datatype it gives to VarBinary fields would be System.Data.Linq.Binary. So your binding syntax would look something like this:

DataValue='<%# ((System.Data.Linq.Binary) Eval("Airline_Logo")).ToArray() %>'

I hope that helps.
Tags
BinaryImage
Asked by
Joby
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Share this question
or