The ArrayList object is a collection of items containing a single data value.
Items are added to the ArrayList with the Add() method.
The following code creates a new ArrayList object named mycountries and four items are added:
By default, an ArrayList object contains 16 entries. An ArrayList can be sized to its final size with the TrimToSize() method:
An ArrayList can also be sorted alphabetically or numerically with the Sort() method:
To sort in reverse order, apply the Reverse() method after the Sort() method:
An ArrayList object may automatically generate the text and values to the following controls:
To bind data to a RadioButtonList control, first create a RadioButtonList control (without any asp:ListItem elements) in an .aspx page:
Then add the script that builds the list and binds the values in the list to the RadioButtonList control:
The DataSource property of the RadioButtonList control is set to the ArrayList and it defines the data source of the RadioButtonList control. The DataBind() method of the RadioButtonList control binds the data source with the RadioButtonList control.
Your message has been sent to welookups.