Introduction
In input control or custom HTML5 input type radio control, web forms radio buttons take inputs from the user. This is used to provide a group of options for the users to choose from that group. There are two states of the radio button: checked and unchecked.

ASP.NET provides its tag to create server-side control.
< asp:RadioButtonID="RadioButton1" runat="server" Text="Coding Ninja" GroupName="communities"/>
And it is rendered as HTML control by the server. furthermore, the following code gets generated-
<input id="RadioButton1" type="radio" name="communities" value="RadioButton1" /><labelfor="RadioButton1">Coding Ninja</label>
Output:

Example of Web Forms Radio Button
Here we are creating a group of two radio buttons, and the group name is codingLanguages.
WebControls.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebControls.aspx.cs"
Inherits="WebFormsControlls.WebControls" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButton ID="RadioButton1" runat="server" Text="Java" GroupName="codingLanguages" />
<asp:RadioButton ID="RadioButton2" runat="server" Text="C++" GroupName="codingLanguages" />
</div>
<p>
<asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click" style="width: 72px" />
</p>
</form>
<asp:Label runat="server" id="codingLanguagesId"></asp:Label>
</body>
</html>
WebControls.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebFormsControlls
{
public partial class WebControls : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
genderId.Text = "";
if (RadioButton1.Checked)
{
codingLanguageId.Text = "Your Coding language is "+RadioButton1.Text;
}
else codingLanguageId.Text = "Your Coding language is "+RadioButton2.Text;
}
}
}
The properties for the control are like this -

The following output will be shown on the browser -

When the user selects any radio buttons, this response is sent back to the client.
