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