473,386 Members | 1,699 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,386 software developers and data experts.

Hyperlink imageURL not displaying URL

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>
<asp:HyperLink id="SkillsTestDate"
imageURL="../images/checkmark.gif" visible="false" Text='<%#
Container.DataItem("SkillsTestDate")%>' NavigateUrl='<%#
"displayAppResumeEE2.aspx?JobID" & Container.DataItem("JobID") %>'
runat='server'/>
</itemtemplate>
</asp:TemplateColumn>

They work fine as:

<asp:TemplateColumn ItemStyle-VerticalAlign="top"
ItemStyle-HorizontalAlign="center" HeaderText="Skills<br>Taken"
ItemStyle-Width="45">
<itemtemplate>
<asp:Image id="SkillsImage" runat="server"
AlternateText="Image Text"
Visible="false"
width="16px"
Height="16px"
ImageUrl="../images/checkmark.gif"/>
</itemtemplate>

Same path, but for some reason the Hyperlink is not showing it, even though
MS says it is one of the properties.

Is there something you have to do to turn it on?

Thanks,

Tom
Nov 19 '05 #1
1 2621
This seems to be working now.

Not sure what was happening. I haven't changed anything and can only assume
there was some caching problem or something (although that doesn't make
sense since other changes were showing up).

I do have a problem getting the Hyperlink to apply width and height to the
image. I made some changes to one of the checkmark images to display as
width and height of 16px. The problem is these are not being rendered. I
did add them in by hand to the view source and displaying the page. This
worked fine.

Here is the original lines:

<asp:TemplateColumn visible="true" ItemStyle-VerticalAlign="top"
ItemStyle-HorizontalAlign="center" HeaderText="Application">
<itemtemplate>
<asp:HyperLink id="ApplicationDate" visible="true"
ImageUrl="../images/checkmark.gif" width="16px" height="16px" Text='<%#
Container.DataItem("ApplicationDate")%>' NavigateUrl='<%#
"displayAppResumeEE2.aspx?JobID" & Container.DataItem("JobID") %>'
runat='server'/>
</itemtemplate>
</asp:TemplateColumn>

But the rendered code is:

</td><td align="Center" valign="Top">
<a id="DataGrid1__ctl2_ApplicationDate"
href="displayAppResumeEE2.aspx?JobID3737"><img src="../images/checkmark.gif"
alt="25Feb05" border="0" /></a>

Where is the width and height? They are valid properties according to MS.
If this is not the case, where how would I set this so that the images are
sized correctly?

Thanks,

Tom
"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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>
<asp:HyperLink id="SkillsTestDate"
imageURL="../images/checkmark.gif" visible="false" Text='<%#
Container.DataItem("SkillsTestDate")%>' NavigateUrl='<%#
"displayAppResumeEE2.aspx?JobID" & Container.DataItem("JobID") %>'
runat='server'/>
</itemtemplate>
</asp:TemplateColumn>

They work fine as:

<asp:TemplateColumn ItemStyle-VerticalAlign="top"
ItemStyle-HorizontalAlign="center" HeaderText="Skills<br>Taken"
ItemStyle-Width="45">
<itemtemplate>
<asp:Image id="SkillsImage" runat="server"
AlternateText="Image Text"
Visible="false"
width="16px"
Height="16px"
ImageUrl="../images/checkmark.gif"/>
</itemtemplate>

Same path, but for some reason the Hyperlink is not showing it, even
though MS says it is one of the properties.

Is there something you have to do to turn it on?

Thanks,

Tom

Nov 19 '05 #2

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

Similar topics

9
by: Leigh Kendall | last post by:
I can't find any issue in the MS KB, but I'm experiencing the following problem which seems to be specific to IE5, and NOT any other version of IE 5.5+ or NN 6+. Issue: I'm using an asp.net...
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...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
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...
1
by: Nick Gilbert | last post by:
Hi, I have just migrated my .NET 1.1 site to .NET 2.0. Most things are now working except that a lot of my images aren't displaying if they referenced the image path using ~. eg: ...
3
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the HyperLink control. My image is large, so I am setting the width/height attributes, but when it renders the width/height attributes are in the <atag rather...
1
by: Paul W Smith | last post by:
The text below is a GridView I am trying to use to display some data from a database. I am using one templatefield of grid because I want the contents of the record fields to appear on three...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.