Ch16-03-01.aspx 以ArrayList对象作为数据来源
Sub Page_Load(Obj As Object, e As EventArgs)
If Not IsPostBack Then
' 声明ArrayList对象
Dim ARList As ArrayList = New ArrayList()
ARList.Add("陈峰棋")
ARList.Add("吴柏毅")
ARList.Add("黄照枚")
ARList.Add("王正伟")
ARList.Add("王伟云")
DropDown1.DataSource = ArList
DropDown1.DataBind()
End If
End Sub
Sub Button1_Click(Obj As Object, e As EventArgs)
Label1.Text = "用户选择:" & DropDown1.SelectedItem.Text
End Sub
OnClick="Button1_Click" Runat="Server" />
BorderColor="#FF00FF" Runat="Server" />