469,631 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Hyperlink images randomly appearing

Hi all,

I have written a web user control that contains a repeater control. the
ItemTemplate for this control is basically 6 Hyperlinks in a row, that are
dynamically allocated one of 7 gif images as the ImageURL of the Hyperlink.
When a load the page with the controls on it works fine, but sometimes the
images are broken, but if i hit refresh i get random selections of the gifs
appearing and not appearing. if i hit Back button to a page it seems to
display the whole control correctly, but if i hit refresh then not all
images display correctly. the code for the user control is below. Is there
some issue with caching of images. Im using IE 6 SP1. Is there a way round
this like using an Image control and putting a <a> tag round it manually
rather than using the asp:hyperlink object. i suspect ill get the same
probem. it has to be a hyperlink as the NavigateURL is also allocated
dynamcally.

<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="PIDisplayControl.ascx.vb"
Inherits="TestHarnessVB.PIDisplayControl"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<table cellPadding="0">
<tr>
<td align="left" width="50px" height="14px" id="SubPILabelCell"
runat="server">
<asp:Label id="lbl_SubPI" runat="server">Sub PIs</asp:Label>
</td>
<td align="left" width="300"><asp:label id="PISummaryTitle"
runat="server"></asp:label></td>
</tr>
</table>
<table>
<tr>
<td align="left" width="350">
<asp:repeater id="Repeater1" runat="server">
<ItemTemplate>
<table cellpadding="0">
<tr>
<td width="50px" height="20px" runat="server" id="SubPICheckBoxCell">
<asp:CheckBox Checked='<%# DataBinder.Eval (Container.DataItem,
"SUBPI") %>' Visible='<%# ShowSubLevelPICheckbox %>' Runat=server
ID="Checkbox1">
</asp:CheckBox>
</td>
<td width="20px" height="20px" align=center valign=middle>
<asp:HyperLink ImageUrl='<%# String.Concat
(imagePath,DataBinder.Eval (Container.DataItem,"M3COLOUR"),imageExt) %>'
Runat="server" NavigateUrl='<%# String.Concat (childPIPage,DataBinder.Eval
(Container.DataItem,"M3URL")) %>' ID="Hyperlink1">
</asp:HyperLink>
</td>
<td width="20px" height="20px" align=center valign=middle>
<asp:HyperLink ImageUrl='<%# String.Concat
(imagePath,DataBinder.Eval (Container.DataItem,"M2COLOUR"),imageExt) %>'
Runat="server" NavigateUrl='<%# String.Concat (childPIPage,DataBinder.Eval
(Container.DataItem,"M2URL")) %>' ID="Hyperlink2">
</asp:HyperLink>
</td>
<td width="20px" height="20px" align=center valign=middle>
<asp:HyperLink ImageUrl='<%# String.Concat
(imagePath,DataBinder.Eval (Container.DataItem,"M1COLOUR"),imageExt) %>'
Runat="server" NavigateUrl='<%# String.Concat (childPIPage,DataBinder.Eval
(Container.DataItem,"M1URL")) %>' ID="Hyperlink3">
</asp:HyperLink>
</td>
<td width="20px" height="20px" align=center valign=middle>
<asp:HyperLink ImageUrl='<%# String.Concat
(imagePath,DataBinder.Eval (Container.DataItem,"NCOLOUR"),imageExt) %>'
Runat="server" NavigateUrl='<%# String.Concat (childPIPage,DataBinder.Eval
(Container.DataItem,"NURL")) %>' ID="Hyperlink4">
</asp:HyperLink>
</td>
<td width="20px" height="20px" align=center valign=middle>
<asp:HyperLink ImageUrl='<%# String.Concat
(imagePath,DataBinder.Eval (Container.DataItem,"P1COLOUR"),imageExt) %>'
Runat="server" NavigateUrl='<%# String.Concat (childPIPage,DataBinder.Eval
(Container.DataItem,"P1URL")) %>' ID="Hyperlink5">
</asp:HyperLink>
</td>
<td width="20px" height="20px" align=center valign=middle>
<asp:HyperLink ImageUrl='<%# String.Concat
(imagePath,DataBinder.Eval (Container.DataItem,"P2COLOUR"),imageExt) %>'
Runat="server" NavigateUrl='<%# String.Concat (childPIPage,DataBinder.Eval
(Container.DataItem,"P2URL")) %>' ID="Hyperlink6">
</asp:HyperLink>
</td>
<td height="20px" width="20px" align="left" valign=middle>
<asp:Label Runat=server Visible='<%# ShowPercentageScore %>'
ID="Label1">
<%# DataBinder.Eval (Container.DataItem,"PERIOD_SCORE") %>
</asp:Label>
</td>
<td height="20px" width="25px" align="left" valign=middle>
<asp:Label>
<%# DataBinder.Eval (Container.DataItem,"PERIOD_CODE") %>
</asp:Label>
</td>
<td height="20px" width="135px" nowrap align="left" valign=middle>
<asp:Label>
<%# DataBinder.Eval (Container.DataItem,"PERIOD_NAME") %>
</asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:repeater>
</td>
</tr>
</table>
Thanks
Ryan Harvey
Sub PIs

Nov 18 '05 #1
0 1988

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sandy Bremmer | last post: by
reply views Thread by Ryan Harvey | last post: by
3 posts views Thread by Simon | last post: by
1 post views Thread by tshad | last post: by
1 post views Thread by Nathan Sokalski | last post: by
5 posts views Thread by Patrick.O.Ige | last post: by
8 posts views Thread by Nathan Sokalski | last post: by
20 posts views Thread by tshad | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.