Setting the selected value of asp:RadioButtonList

Gexer

New Member
I have a radiobuttonList and i find the following solution to set the selected value using the code behind.\[code\] RadioButtonList1.Items.FindByValue("1").Selected = true;\[/code\]I was wondering if there was a solution without using the code behind. Below code is not working obviously, but i want to do somehting like the following. Thanks in advance\[code\] <asp:RadioButtonList ID="ItemValue" runat="server" Width="109px" value="http://stackoverflow.com/questions/14042476/<%# Bind("ID")%>"> <asp:ListItem Value="http://stackoverflow.com/questions/14042476/1">Test1</asp:ListItem> <asp:ListItem Value="http://stackoverflow.com/questions/14042476/2">Test2</asp:ListItem> </asp:RadioButtonList>\[/code\]
 
Back
Top