当我将列表项动态分配给单选按钮列表时,各个列表项的值属性等于该列表项的文本值。简而言之,我的值不用于属性值。
Dim items As New ListItemCollection()
items.Add(New ListItem("hi there", "30"))
rblCompanyType.DataSource = items
rblCompanyType.DataBind()
<asp:RadioButtonList ID="rblCompanyType" Width="490" RepeatColumns="2" RepeatDirection="Vertical" runat="server"></asp:RadioButtonList>
<table style="width:490px;" id="CPHCenter_rblCompanyType">
<tbody><tr>
<td>
<input type="radio" value="hi there" name="ctl00$CPHCenter$rblCompanyType" id="CPHCenter_rblCompanyType_0">
<label for="CPHCenter_rblCompanyType_0">hi there</label>
</td>
</tr>
</tbody>
</table>