How can I set 1 of my radio buttons to load up checked?
That wasnt to bad now was it.
CHeers
Printable View
How can I set 1 of my radio buttons to load up checked?
That wasnt to bad now was it.
CHeers
in the page load event RadioButton.Checked = True
Its not a single radio button but a radio button list.
I want the first item to be ticked by default.
Cheers
VB Code:
<script language="vb" runat="server"> Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) If Not Page.IsPostBack MyRadioButtonList.Items(0).Selected = True End If End Sub </script> <html> <body> <form id="Form1" method="post" runat="server"> <asp:RadioButtonList id="MyRadioButtonList" runat="server"> <asp:ListItem Value="1">Item1</asp:ListItem> <asp:ListItem Value="2">Item2</asp:ListItem> </asp:RadioButtonList> </form> </body> </html>
Cheers.
May the sun always shine on fort collins.