Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Travis 19 posts 46 karma points
    Jan 30, 2011 @ 14:25
    Travis
    0

    Macro Cache forgets images in repeater control

    I am running into an odd situation - after a weekend of frantic attempts to improve performance of a site I find the Macro cache!  An instant answer to my questions - at least on the surface.  I slap it on a known problem spot and like magic my CPU use drops to a tiny franction but my images went poof!!!

     

    A cut down version of my control is below.  It displays fine without cache enabled but with cache on the images turn into empty white boxes.  Not a good look.  If there some trick to getting this to work?  The text content works just fine, its just that pesky image.   Thanks for any help - I have my fingers crossed this works as it will turn what is an out of control project into a blazing fast work of art!

    <asp:Repeater runat="server" ID="contentBound" >
    
      <ItemTemplate>
         <h2><asp:Literal runat="server" Text='<%# Eval("Title") %>' /> <span class="grey">.</span></h2>
    
         <div class="featureImg">
         <asp:Image  id="Img1" Height=' <%# Eval("ImageHeight") %>' Width='<%# Eval("ImageWidth") %>' runat="server" alt=""  ImageUrl='<%# Eval("ImageURL") %>'  />       
        </div>
    
    </ItemTemplate>
    </asp:Repeater>
  • Kim Andersen 1447 posts 2197 karma points MVP
    Jan 30, 2011 @ 15:20
    Kim Andersen
    0

    Hi Travis

    Are the images "not found" or just not renderd in the source code at all? I mean, could you show us how the img-tag look with and without caching enabled.

    /Kim A

  • Travis 19 posts 46 karma points
    Jan 30, 2011 @ 15:39
    Travis
    0

    A nice working image. 

    <img src="/media/9514/Wine/Krondorf-symmetry.jpg" id="ContentPlaceHolderDefault_BodyArea_homeFrontBestSelling_5_contentBound_Img1_1" height="128" width="42">

    And the same image after macro cache gets to it 

    <img id="ContentPlaceHolderDefault_BodyArea_homeFrontBestSelling_5_contentBound_Img1_1" height="128" width="42"> 

    Where did my src go?  Wacky :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies