473,326 Members | 2,090 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,326 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 954

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.