I have a list of radio buttons ...
<asp:RadioButtonList ID="rblCollectOptions" runat="server" CssClass="radiolist"> <asp:ListItem Value="Collect" Text="Collect from this address"></asp:ListItem> <asp:ListItem Value="DropOff" Text="Drop off at Depot (UK only)"></asp:ListItem> </asp:RadioButtonList>
I also have a link button on the page to "enter the address manually", which I want to set for the "Collect" value.
I tried...
rblCollectOptions.SelectedIndex = 0;
and
rblCollectOptions.Items[0].Selected = true;
both work if no parameter is already selected, but if I manually set the switch to another parameter or set the default selection, the link button does not work.
source share