关于dropdownlist的问题 ,在线等,卡这了,请指点下~
Dim ConnStr as String
ConnStr = "Data Source=localhost;Persist Security Info=False;User ID=Gavin;Password='123456';Initial Catalog=VRAS"
Dim Conn as SqlConnection = new SqlConnection(ConnStr)
Dim sql as string
'sql = "SELECT Week FROM ERS"
Dim da as SqlDataAdapter = New SqlDataAdapter("SELECT * FROM week ",Conn)
Dim ds as new DataSet()
da.fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
dropdownlist2.DataSource = ds.Tables(0).DefaultView
dropdownlist2.DataBind()
End If
为什么这段代码我得到在dropdownlist中得到的值是:System.Data.DataRowView
请问哪出问题了?