asp.net - 如何使用数据表在单选按钮列表中设置默认值

标签 asp.net

我有一个单选按钮列表,其中我绑定(bind)到我的数据表。我能够绑定(bind)到单选按钮列表 我有列[id, name] 默认情况下名称应该在单选按钮列表中被选中。

  1. 现在默认情况下我需要为数据表中的值选择一个单选按钮 如何在这里实现这个概念 谢谢你

最佳答案

    <asp:RadioButtonList ID="RadioButtonList1" runat="server">
        <asp:ListItem>One</asp:ListItem>
        <asp:ListItem Selected="True">Two</asp:ListItem>
        <asp:ListItem>Three</asp:ListItem>
    </asp:RadioButtonList>

关于asp.net - 如何使用数据表在单选按钮列表中设置默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1713524/

相关文章:

c# - .Net 4.0 JSON 序列化 : Double quotes are changed to\"

asp.net - GridView 更新后覆盖 editindex

asp.net - 我是否真的无法在商业应用程序中使用 Codeplex 的 Telerik Asp.NET MVC 控件?

.net - 是什么导致 "HTTP status 401: OK"

javascript - ASP.NET:禁用 Javascript 的 asp:LinkBut​​ton?

asp.net - 需要测试ajax超时条件

c# - 如何使用每个 C# 智能技术将项目从其他列表添加到列表中

c# - 将 Plupload 与 ASP.NET/C# 结合使用

c# - 扩展asp.net的c#文本框控件

asp.net - 如何隐藏或删除线系列 RadChart 中的零值