473,473 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2191

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: 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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.