【发布时间】:2013-04-15 14:34:46
【问题描述】:
我有以下 -
<asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Vertical" RepeatLayout="Table" CssClass="RBL" TextAlign="Right">
<asp:ListItem Text= "Individual - This is for user" />
<asp:ListItem Text="Enterprise - This is for enterprises" />
</asp:RadioButtonList>
我喜欢在Individual和Enterprise下划线。
我尝试了类似以下的方法,但没有成功:
<asp:ListItem Text= <span class="underline"> Individual </span>-....
据我所知:
Error 71 The 'Text' property of 'asp:ListItem' does not allow child objects.
【问题讨论】:
-
检查这个问题:stackoverflow.com/questions/8123757/… 您可以使用相同的方法根据值将类属性添加到 ListItems
-
如果文本与传统超链接(也有下划线)冲突,请考虑使用粗体或斜体样式作为替代。
标签: asp.net