<%@ Page Language="VB" %>

<script runat="server">
    Protected Sub RadioButton_CheckedChanged(ByVal sender As Object, _
      ByVal e As System.EventArgs)
        If RadioButton1.Checked = True Then
            Response.Write("Wybrałeś Visual Basic")
        Else
            Response.Write("Wybrałeś C#")
        End If
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Kontrolka RadioButton</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:RadioButton ID="RadioButton1" runat="server" Text="Visual Basic" 
         GroupName="LanguageChoice" OnCheckedChanged="RadioButton_CheckedChanged" 
         AutoPostBack="True" />
        <asp:RadioButton ID="RadioButton2" runat="server" Text="C#" 
         GroupName="LanguageChoice" OnCheckedChanged="RadioButton_CheckedChanged"     
         AutoPostBack="True" />
    </div>
    </form>
</body>
</html>
