RadioButton Control
Previous | Home | Next |
RadioButton Controls are Web server Control that provides option for selection.This control help to select a choice from a set of many choice.we can add individualy RadioButton control to a web pageand work with it indivisualy. Property:GroupName::Obtain the name of group that Radio button belongs to.
RadioButton *********************************************************************** <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadioButton.aspx.cs" Inherits="_Default" %>********************************************************************** .CS Coding ********************************************************************** using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { if (RadioButton1.Checked) { TextBox1.Text = "You have selected:Black"; } if (RadioButton2.Checked) { TextBox1.Text = "You have selected:Red"; } if (RadioButton3.Checked) { TextBox1.Text = "You have selected:White"; } } protected void RadioButton1_CheckedChanged(object sender, EventArgs e) { } protected void RadioButton2_CheckedChanged(object sender, EventArgs e) { } protected void RadioButton3_CheckedChanged(object sender, EventArgs e) { } }RadioButton Control
Previous | Home | Next |