Click to See Complete Forum and Search --> : radio buttons
venerable bede
Feb 4th, 2003, 05:33 AM
How can I set 1 of my radio buttons to load up checked?
That wasnt to bad now was it.
CHeers
EyeTalion
Feb 4th, 2003, 07:24 AM
in the page load event RadioButton.Checked = True
venerable bede
Feb 5th, 2003, 05:30 AM
Its not a single radio button but a radio button list.
I want the first item to be ticked by default.
Cheers
pvb
Feb 8th, 2003, 06:59 PM
<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>
venerable bede
Feb 10th, 2003, 08:42 AM
Cheers.
May the sun always shine on fort collins.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.