I have a radio button and I would like to default the first item as checked by default. How do I go about doing that? Below is my source code for the radio button.
<asp:RadioButtonList ID="radRiskLevel" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="High">High</asp:ListItem>
<asp:ListItem Value="Mid">Mid</asp:ListItem>
<asp:ListItem Value="Low">Low</asp:ListItem>
</asp:RadioButtonList>
ASPX Markup
<asp:RadioButtonList ID="radRiskLevel" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="High" Selected="True">Select</asp:ListItem>
<asp:ListItem Value="High">High</asp:ListItem>
<asp:ListItem Value="Mid">Mid</asp:ListItem>
<asp:ListItem Value="Low">Low</asp:ListItem>
</asp:RadioButtonList>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With