Image does not display

2 posts, 0 answers
  1. David Simmonds
    David Simmonds avatar
    56 posts
    Member since:
    Mar 2010

    Posted 09 Nov 2011 Link to this post

    I have a RadBinaryImage in a asp:Repeater template. I also have a RadBinaryImage in a RadRotator template. The Repeater works. The Rotator does not. What am I doing wrong?
    <asp:Repeater runat="server" ID="AttachmentRepeater" EnableViewState="false">
            <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" ResizeMode="Fit" DataValue='<%# Eval("Image")%>' Width="200" Height="200" />
            <telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="ButtonsOver" Width="572"
                Height="118px" ItemHeight="118" ItemWidth="145" FrameDuration="1000" ScrollDirection="Left,Right" OnItemClick="ShowImage">
                        <telerik:RadBinaryImage ID="RadBinaryImage2" runat="server" ResizeMode="Fit"
                                                 DataValue='<%# Eval("Image")%>' Width="200" Height="200" />
                <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />

    In the following code, the Images collection contains objects that have a Byte[] property and a String property. The Byte[] is the contents of an image acquired by using an AsyncUpload control.

    DataTable rotatorData = new DataTable();
     rotatorData.Columns.Add("Image", typeof(System.Array));
     foreach (ImageInfo tempInfo in Images)
         DataRow row = rotatorData.NewRow();
         row["Image"] = tempInfo.Image;
         row["Name"] = tempInfo.Name;
     thumbRotator.DataSource = rotatorData;

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 10 Nov 2011 Link to this post

    Hello David,

    I have tried the same scenario and that worked as expected. Please make sure that you have registered the http handler of the RadBinaryImage control as explained here.
    <telerik:RadRotator ID="RadRotator1" runat="server" Width="305px" Height="114px" ScrollDuration="500" FrameDuration="2000" ItemHeight="110" ItemWidth="100" DataSourceID="SqlDataSource1">
                  <telerik:RadBinaryImage runat="server"  ID="RadBinaryImage1" DataValue='<%#Bind("Picture") %>'
                      AutoAdjustImageControlSize="false" Width="90px" Height="110px" AlternateText="No Image!!" />

  3. DevCraft R3 2016 release webinar banner
Back to Top