ASP.NET RadioButton control.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
The RadioButton control is used to allow users to make a selection of definite objects on the webpage. The control is rendered in HTML as an input element type radio and if the text property is assigned text, the text filed is rendered as HTML label element.
Working example.
Creating the RadioButton control.
From the above example.
<asp:RadioButton ID="RadioButton1" runat="server" Text="Your selection." />
The above example will be rendered as HTML with the result below (source).
<input id="ctl00_ContentPlaceHolder1_RadioButton1" type="radio" name="ctl00$ContentPlaceHolder1$RadioButton1" value="RadioButton1" />
<label for="ctl00_ContentPlaceHolder1_RadioButton1">Your selection.</label>
|