asp.net - vb.net 单选按钮选择

标签 asp.net vb.net

我在 vb.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 个列表项之一。 如何在 vb.net 中以编程方式选择上面的"is"

最佳答案

这应该有效:

rbEditTop25.Items.FindByText("Yes").Selected = True

关于asp.net - vb.net 单选按钮选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10323261/

相关文章:

c# - 服务器标记格式不正确错误

c# - VB 2008 程序集中的扩展方法不能在 C# 项目中使用?

c# - 调用远程dll

vb.net - 在.NET环境下编译VB6代码

c# - 网页上的移动图像

asp.net - 如何在 IIS 中为我​​的网站关闭自定义错误处理?

asp.net - "IIS Manager cannot verify whether the built-in account has access"

c# - 在asp.net MVC中获取第三个参数

asp.net - 为什么文本在复选框下方移动而不是在复选框旁边移动 1 行?

asp.net - 正则表达式-将文本追加到youtube链接的 'src'字段