RadioButton Control in Asp.Net


                                           We always use RadioButton control in group. Only one radio button in a group of RadioButton controls can be checked at a time by using "GroupName" property of radiobutton.

 The sample code using radio buttons in ASP.NET 

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Using RadioButtons in Asp.Net</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Select your Gender :
        <asp:RadioButton ID="RadioButton1" runat="server" Text="Male" GroupName="gender" />
        <asp:RadioButton ID="RadioButton2" runat="server" Text="Female" GroupName="gender" />
    </div>
    </form>
</body>
</html>