我有一个包含两个 ListItem 的 RadioButtonList:
<asp:RadioButtonList runat="server" ID="optRollover" OnSelectedIndexChanged="RolloverOptionSelected" AutoPostBack="true">
<asp:ListItem Value="0">100% </asp:ListItem>
<asp:ListItem Value="1">Less than 100%</asp:ListItem>
</asp:RadioButtonList><br />
在第一个 ListItem 上,我需要一个标签来显示页面后面代码中的一些文本。从逻辑上讲,在我看来,我可以做这样的事情:100%
显然这不起作用,因为我收到一个错误:“asp:ListItem”的“文本”属性不允许子对象。
任何人都可以想出解决这个约束的方法吗?