海的朋友,
我写代码时选择每周在DropDownList的值,然后每周列显示在列表框中
但我找不到怎么办
Protected Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddl.SelectedIndexChanged
Dim con As New SqlConnection("Data Source=.\SQLEXPRESS;initial catalog=workdb;persist Security info =true;user id=sa;password=vectra")
Dim da As New SqlDataAdapter("select weekly from table1 ", con)
Dim ds As New DataSet()
da.Fill(ds, "d")
If ds.Tables(0).Rows.Count > 0 Then
ListBox1.DataSource = ds.Tables(0)
ListBox1.DataBind()
End If
End Sub