<%@ Page Language="VB" %>
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
IF Me.RadioButton1.Checked = True Then
Me.lblText1.Text = "Option 1 Checked"
End IF
IF Me.RadioButton2.Checked = True Then
Me.lblText1.Text = "Option 2 Checked"
End IF
End Sub
Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs)
IF Me.RadioButton3.Checked = True Then
Me.lblText2.Text = "Option 3 Checked"
End IF
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:RadioButton id="RadioButton1" runat="server" text="Option 1" GroupName="Group1"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" runat="server" text="Option 2" GroupName="Group1"></asp:RadioButton>
<br>
<asp:RadioButton id="RadioButton3" runat="server" text="Option 3" GroupName="Group2" AutoPostBack="true" OnCheckedChanged="RadioButton3_CheckedChanged"></asp:RadioButton>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
<hr />
<asp:Label id="lblText1" runat="server"></asp:Label>
<br>
<asp:Label id="lblText2" runat="server"></asp:Label>
</form>
</body>
</html>