Image not showing

2 posts, 0 answers
  1. Joby
    Joby avatar
    25 posts
    Member since:
    Nov 2010

    Posted 11 Apr 2012 Link to this post

    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
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 11 May 2012 Link to this post

    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.
  3. Telerik UI for ASP.NET Core is out
Back to Top