数据绑定中的不同

来源:互联网 发布:java web开发书籍排名 编辑:程序博客网 时间:2024/05/21 11:12
 

创建 ArrayList

ArrayList 对象是包含单一数据值的项目的集合。

通过 Add() 方法向 ArrayList 添加项目。

下面的代码创建了一个新的 ArrayList 对象,名为 mycountries,并添加了四个项目:

<script runat="server">Sub Page_Loadif Not Page.IsPostBack then  dim mycountries=New ArrayList  mycountries.Add("China")  mycountries.Add("Sweden")  mycountries.Add("France")  mycountries.Add("Italy")end ifend sub</script>