我想更改颜色并在数据列表的项目模板中仅选定按钮中放置的链接按钮的内容下划线
下面是我的代码,用于设置链接按钮
<asp:DataList ID="DlPaging" runat="server" BorderWidth="0" RepeatDirection="Horizontal">
<ItemTemplate>
<asp:LinkButton CssClass="pagenav" ID="LnkBtnPage" OnClientClick="clickfire(this.id);" runat="server" Visible="true">
<%# Container.ItemIndex +1 %>
</asp:LinkButton>
<%-- <asp:Label runat="server" ID="LblPage" CssClass="pagenav2" Font-Bold="True" Visible="true"
Text='<%# Container.ItemIndex +1 %>'>
</asp:Label>
--%>
</ItemTemplate>
</asp:DataList>
最佳答案
您可以使用 CSS 轻松完成您想要的事情。
.pagenav:hover {
text-decoration: underline;
color: blue;
}
关于c# - 更改颜色并为链接按钮的内容添加下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17595486/