Dynamic images appear blank (white) after UpdatePanel updatehttp://forums.asp.net/t/1619036.aspx/1?Dynamic+images+appear+blank+white+after+UpdatePanel+updateMon, 01 Nov 2010 22:09:09 -040016190364150363http://forums.asp.net/p/1619036/4150363.aspx/1?Dynamic+images+appear+blank+white+after+UpdatePanel+updateDynamic images appear blank (white) after UpdatePanel update <p>I have a&nbsp;GridView within an UpdatePanel.&nbsp; The UpdatePanel refreshes on a Timer.</p> <p>On that&nbsp;GridView&nbsp;is a column of preview&nbsp;images that are dynamically created by resizing the original images.</p> <p>I lazy load the images after the page has loaded using the Javascript below:</p> <pre class="prettyprint">var urls = ''; function saveImageUrl(imgID, url) { urls = urls &#43; imgID &#43; '|' &#43; url &#43; ';'; } function postLoadImages() { if (urls != '') { var images = urls.split(';'); for (var i = 0; i &lt; images.length - 1; i&#43;&#43;) { var subparts = images[i].split('|'); $get(subparts[0]).src = 'Code/ImageHandler.ashx?s=tip&amp;url=' &#43; subparts[1]; } urls = ''; } }</pre> <P>I call the saveImageUrl() function in the RowDataBound event of the GridView:</P><pre class="prettyprint"> var script = string.Format("saveImageUrl('{0}', '{1}');", previewImage.ClientID, imageUrlHiddenField.Value); ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), script, true);</pre> <p><br> On the initial page load,&nbsp;the HttpHandler is hit and the images load as expected.</p> <p>However, <strong>when the GridView is refreshed and the UpdatePanel updates</strong>, the images are displayed as blank (entirely white).&nbsp; The HttpHandler is getting hit, and the Javascript is getting called.&nbsp; The images are even the correct size.&nbsp; However, they are just white.</p> <p>Any ideas?</p> 2010-11-01T22:09:09-04:00