.net - Asp.net 中的单选按钮列表

标签 .net asp.net radiobuttonlist

我的问题是我想根据我的要求在数据库中存储实用的每月计划我必须在 webform 中显示每月和 3 个月的计划请帮助我我需要 C# 的代码

 RadioButtonList ID="rbtnlistProgramPlans" runat="server"
      asp:ListItem Text="Practical Monthly Plan" Value="0"   **Monthly**   asp:ListItem
            asp:ListItem Text="Practical 3 Month's Plan" Value="1"   **3 Month's**   asp:ListItem

Monthly 和 3 Month's 显示在用户的网络表单中,但我想存储选择了哪个单选按钮列表 text="Practical Monthly Plan"..like that help me 我是新的 asp.net

最佳答案

您当前在单选按钮列表中的列表项是

<asp:ListItem Text="Practical Monthly Plan" Value="0">Monthly</asp:ListItem>

但它应该像...

<asp:ListItem Text="Practical Monthly Plan" Value="0"></asp:ListItem>

作为开始 <asp:ListItem> and </asp:ListItem> 之间的文本考虑作为显示文本和 override Text property of listitem

关于.net - Asp.net 中的单选按钮列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6786368/

相关文章:

c# - 人们在持久性 .NET 词典中想要什么?

c# - 有没有办法在最小化进程时也从进程中获取屏幕截图?

ASP.NET 使用 VB 设置文件路径

asp.net - 单选按钮列表标签格式

grails - 如何获取gsp页面中选定单选按钮的id值以使 Controller /域类

.net - Swift 和 .Net Web 应用程序的业务类

c# - MEF:使用和从组合零件导出来满足导出零件的要求

ASP.NET 登录页面

asp.net - 注册启动脚本控制

python - Google App Engine + 表单验证