I am trying to select the radiobuttonlist's using the following code but it never get selected.
<asp:RadioButtonList ID="rdBond" CssClass="RadioButtonList"
runat="server" RepeatDirection="Horizontal">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>
and I tried both of the follwing methods but doesn't work.
ListItem l2 = rdOffset.Items.FindByValue(cd.BondReq.ToString());
if (l2 != null)
l2.Selected = true;
rdOffset.SelectedValue = cd.Offset.ToString();
Please help to fix it.
Samuel Fernandes
15-Jan-2015Make this change :