I have this asp radio button group, which i want to look like bootstrap selectable cards …
<asp:RadioButtonList ID="origin_channel" runat="server" AutoPostBack="True"RepeatDirection="Horizontal">
<asp:ListItem Value="REP">Representatives</asp:ListItem>
<asp:ListItem Value="VIP">VVIPs</asp:ListItem>
<asp:ListItem Value="OTH">Others</asp:ListItem>
</asp:RadioButtonList>
2
Answers
Given an ASP.NET RadioButtonList with classes set on the ListItems:
To transform your ASP.NET
RadioButtonList
component into a visually appealing Bootstrap-inspired card selection interface, you can leverage Bootstrap classes alongside a touch of personalizedCSS
. Here’s a guide on accomplishing this:Include Bootstrap CSS and JavaScript in your page if you haven’t already:
Modify your
RadioButtonList
control to generate Bootstrap-style selectable cards:We’ve enclosed your
RadioButtonList
control within a Bootstrapbtn-group
container, leveraging Bootstrap’s button styles (btn
andbtn-outline-primary
) to give each radio button the appearance of a selectable card. We’ve also configured theGroupName
property to enforce single selection within the group.This approach transforms your radio buttons into stylish Bootstrap-selectable cards with a primary outline design. You have the flexibility to further refine the styling by employing various Bootstrap classes and applying custom CSS as required.