HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
ArrayList object that contains a collection of individual data value items.
ArrayList object that contains a collection of individual data value items.
Adding items to the ArrayList via Add () method.
The following code creates an ArrayList object named mycountries and adds four items:
By default, an ArrayList object contains 16 entries. By TrimToSize () method to adjust the final size ArrayList:
By Sort () method, ArrayList can be in alphabetical order or numerical order Sort by:
To achieve reverse sort, after the Sort () Method Reverse () method:
ArrayList object can automatically generate text and values for the following controls:
To bind data to a RadioButtonList control, first create a RadioButtonList control in an x page (without any asp: ListItem elements):
Then add the script to create the list, and the binding values in the list to the RadioButtonList control:
RadioButtonList control DataSource property is set to the ArrayList, which defines the data source of the RadioButtonList control. RadioButtonList control's DataBind () method of the RadioButtonList control binds the data source.
Note: The data value as Text and Value property of the control to use.Unlike Text To add the Value, please use the Hashtable object or the SortedList object.