Asp.net 中的单选按钮列表

发布于 2024-11-25 13:30:35 字数 425 浏览 4 评论 0原文

我的问题是我想根据我的要求在数据库中存储实用的每月计划我必须在网络表单中显示每月和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

每月和3个月的代码显示在用户的网络表单,但我想存储选择的单选按钮列表文本=“实用月度计划”..就像这对我有帮助 我是新的asp.net

My problem is i want to store Practical Monthly plan in database as per my requirement i have to display Monthly and 3 Month's Plan in webform please help me i need the code with 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 and 3 Month's are displayed in webform for user but i want to store which radiobuttonlist is selected that text="Practical Monthly Plan"..like that help me
I am new asp.net

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心凉怎暖 2024-12-02 13:30:35

您当前在 radiobuttonlist 中的列表项是,

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

但它应该像...

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

作为开始 之间的文本和 视为显示文本并覆盖 listitem 的 Text 属性

Your current listitem in radiobuttonlist is

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

but it should be like...

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

as text between starting <asp:ListItem> and </asp:ListItem> consider as Displaying text and override Text property of listitem

ぃ弥猫深巷。 2024-12-02 13:30:35

代码示例:

<asp:RadioButtonList id=RadioButtonList1 runat="server">
         <asp:ListItem Text="Practical Monthly Plan" Value="1"></asp:ListItem>
         <asp:ListItem Text="Practical 3 Monthly Plan" Value="3"></asp:ListItem>
         <asp:ListItem Text="Practical X Monthly Plan" Value="X"></asp:ListItem>
</asp:RadioButtonList>

来自 Microsoft 的更多信息

Code ex:

<asp:RadioButtonList id=RadioButtonList1 runat="server">
         <asp:ListItem Text="Practical Monthly Plan" Value="1"></asp:ListItem>
         <asp:ListItem Text="Practical 3 Monthly Plan" Value="3"></asp:ListItem>
         <asp:ListItem Text="Practical X Monthly Plan" Value="X"></asp:ListItem>
</asp:RadioButtonList>

more info from Microsoft

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文