P
PD
I have the following ItemTemplate in a datagrid:
<asp:TemplateColumn ItemStyle-Width="35"
ItemStyle-HorizontalAlign=Center ItemStyle-CssClass="LinkClass">
<ItemTemplate>
<a href="#" class="LinkClass" name="lnkopenImage<%#
Container.ItemIndex%>" id="lnkopenImage<%# Container.ItemIndex%>"
onclick="javascript:OpenImage('<%# DataBinder.Eval(Container.DataItem,
"reportID")%>', '<%# DataBinder.Eval(Container.DataItem,
"reportVersionID")%>', '<%# DataBinder.Eval(Container.DataItem,
"reportSectionID")%>', '<%# Container.ItemIndex%>'); return
false;">View</a>
</ItemTemplate>
</asp:TemplateColumn>
LinkClass A:visited
{
color:Red;
}
When the datagrid paints onto the page, the control changes to the
default color for a visited link. It doesn't even change it to red as
is set in the stylesheet. As you can see, I tried putting in a new
class for that particular control with the grid. No luck. Once, the
grid is painted, the link is automatically set to "visited". Any
suggestions on how I can get this to not happen. I just want the color
to change after it has been clicked.
Thanks in advance!
Patrick
<asp:TemplateColumn ItemStyle-Width="35"
ItemStyle-HorizontalAlign=Center ItemStyle-CssClass="LinkClass">
<ItemTemplate>
<a href="#" class="LinkClass" name="lnkopenImage<%#
Container.ItemIndex%>" id="lnkopenImage<%# Container.ItemIndex%>"
onclick="javascript:OpenImage('<%# DataBinder.Eval(Container.DataItem,
"reportID")%>', '<%# DataBinder.Eval(Container.DataItem,
"reportVersionID")%>', '<%# DataBinder.Eval(Container.DataItem,
"reportSectionID")%>', '<%# Container.ItemIndex%>'); return
false;">View</a>
</ItemTemplate>
</asp:TemplateColumn>
LinkClass A:visited
{
color:Red;
}
When the datagrid paints onto the page, the control changes to the
default color for a visited link. It doesn't even change it to red as
is set in the stylesheet. As you can see, I tried putting in a new
class for that particular control with the grid. No luck. Once, the
grid is painted, the link is automatically set to "visited". Any
suggestions on how I can get this to not happen. I just want the color
to change after it has been clicked.
Thanks in advance!
Patrick