Image Not Displaying In DataList

3 posts, 1 answers
  1. Joe
    Joe avatar
    26 posts
    Member since:
    May 2009

    Posted 23 Feb 2010 Link to this post


    Is there something I am missing.  My images won't display.  I have a datalist that is bound from code behind.  Here is what it looks like:

    <asp:DataList ID="dlProducts" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" 
                RepeatLayout="Table" ItemStyle-CssClass="ItemBox"
                            <telerik:RadBinaryImage ID="rbiGridImage" runat="server" DataValue='<%# DataBinder.Eval(Container.DataItem, "PictureBinary") %>' /> 
                            <%# DataBinder.Eval(Container.DataItem, "Name") %></li
                            <%# DataBinder.Eval(Container.DataItem, "OldPrice") %></li
                            <%# DataBinder.Eval(Container.DataItem, "Price") %></li
                            <%# DataBinder.Eval(Container.DataItem, "MName") %></li
     All other fields display correctly and if I remove the RadBinaryImage and bind the raw data I get "<Binary Data>" so I know I am binding correctly.

    Any ideas?
    One more thing, if I the run query that loads my data the "PictureBinary" field data looks like this:
    Which looks pretty binary to me.
    Thanks. Joe.

  2. Answer
    Rosen avatar
    3247 posts

    Posted 24 Feb 2010 Link to this post

    Hi Joe,

    Can you please verify that you have correctly registered the Telerik.Web.UI.WebResource handler in the webconfig? You can do this using RadBinaryImage smartTag or manually by adding following lines to your webconfig:

    for IIS classic pool or VS's webdevelopmnet server:
       <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" /> 

    if integrated pool is used:
     <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" /> 

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Joe
    Joe avatar
    26 posts
    Member since:
    May 2009

    Posted 24 Feb 2010 Link to this post

    Hi Rosen,

    That was it!  Easy peezy.

    I guess I should read the instructions better.  I read that the http handler was integrated so it never occurred to me that I still needed to reference in the web.config.  Duh.

    thanks Rosen.

Back to Top