ASP.Net - Create two radio buttons and put them in a group Code Example

The code for Create two radio buttons and put them in a group

<%@ 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="Yes" GroupName="Result" />  
            <asp:RadioButton ID="RadioButton2" runat="server" Text="No" GroupName="Result" />  
        </div>  
        <p>  
            <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click" style="width: 61px" />  
        </p>  
    </form>  
    <asp:Label runat="server" id="ResultID"></asp:Label>  
</body>  
</html>  
Code by IncludeHelp, on August 13, 2022 00:04

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.