ASP.NET Tutorial

.NET Framework

ASP.NET Introduction

ASP.NET Web Forms

Standard Controls

Label Control

TextBox Control

Image Control

Button Controls

Redirecting User

Using HyperLinks

RadioButton Control

RadioButtonList

CheckBox Control

CheckBoxList Control

DropDownList

ListBox Control

ImageMap Control

Event-Driven Programming

ASP.NET Page Structure

IsPostBack

Master Page

View State

Visibility of Controls

Formatting Controls

Applying CSS

Dynamic CSS

Using Style Class

Themes and Skins

Panel Control

PlaceHolder Control

AdRotator Control

Calendar Control

File Upload, Virtual Path

Validation Controls

Page Navigation

User Control

Separating Code-Presentation

Overview of ADO.NET

Data Binding

DataBinding List Control

RadioButtonList Control in ASP.NET

Group of Radio Buttons

The properties, methods, and events of the RadioButtonList control are listed in Table
Property Description
Items Represents the collection of items in the list.
TextAlign Determines how text label is aligned relative to radio button. Possible values are Left, and Right (default).
AutoPostBack If True, the form is automatically posted when a new radio button is selected from the list.
SelectedItem Represents the selected radio button.
SelectedIndex Specifies the index number of currently checked radio button.
RepeatColumns Determines the number of columns sued to display radio buttons.
RepeatDirection Indicates the direction in which radio buttons must be repeated. Can be Horizontal, or Vertical.
RepeatLayout Determines how radio buttons are formatted. Can be Table (default), or Flow.
DataSource Identifies the data source for the items listed in the list.
DataMember Identifies the particular table in a data source to bind to the control.
DataTextField Identifies the field from the data source to use for radio button labels.
DataValueField Identifies the field from the data source to use for radio button values.
DataTextFormatString Gets or sets a format string that determines how DataTextField is displayed.
CellPadding Sets number of pixels between the border and a particular radio button.
CellSpacing Sets number of pixels between radio buttons in the list.
Methods Description
DataBind Binds the list to data source. Loads items from data source into the items collection.
OnSelectedIndexChanged Raises the SelectedIndexChanged event.
Events Description
SelectedIndexChanged Raised when a new radio button is selected in the list.
The output of the three methods to create a list of radio buttons is the same:


The output of the three methods to create a list of radio buttons is the same: