vb.net单选按钮选择
问题描述:
我已在在vb.netvb.net单选按钮选择
<asp:RadioButtonList ID="rbEdit5" runat="server" RepeatDirection="horizontal" >
<asp:ListItem Value="1" >Yes</asp:ListItem>
<asp:ListItem Value="0" >No</asp:ListItem>
</asp:RadioButtonList>
以下我需要以编程方式选择的2个listItems中之一。 如何编程选择说“是”上面在vb.net
答
这应该工作:
rbEditTop25.Items.FindByText("Yes").Selected = True
答
For Each li As ListItem In rbEditTop25.Items
If li.Text= "Yes" Then
li.Selected = True
End If
Next
答
rbEditTop25.SelectedValue = "1"
应该做的伎俩!
我怎么编程做这个有关系吗? – 2012-04-25 20:34:13
对不起,错过了。 – Matt 2012-04-25 20:34:36
这是为了答复吗? – 2012-04-25 20:37:20