473,396 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2186

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sandy Bremmer | last post by:
I have seen many Javascripts that rotate images with each load or refresh of the page but so far all I've found require hard coding the image filename into the script. Does anyone know of a script...
0
by: Ryan Harvey | last post by:
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...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
1
by: tshad | last post by:
Is there some reason why the Hyperlink in a DataGrid will not show an image? I have a datagrid with the following: <asp:TemplateColumn visible="false" HeaderText="Skills"> <itemtemplate>...
1
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the Hyperlink control to create a graphical Hyperlink. However, I want to change the size of the image I am using, but the generated HTML places the width/height...
5
by: Patrick.O.Ige | last post by:
I want to have a rollover image on an hyperlink inside a Repeater control but when i run the page i get "Image1 is undefined" Any ideas? I have a Hyperlink and an Image control in a repeater...
8
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a...
2
by: news | last post by:
Hello, I have a webpage with some hyperlink within a button. The problem is that some of my hyperlink is shorter that others and therefore the user must navigate to the hyperlink to click on the...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
2
by: plsHelpMe | last post by:
Hi All, I am trying to have some images(images of button) on my web page. This image replicate an image of a button having text as Add. I ahve codded it in JSP, i can see this image as expected...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.