Dim _tableBackLogs As System.Data.DataTable
Do While i - 2 > 0
_tableBackLogs = Global.DataAccess.GetDataTable("SELECT SubjectID,SubjectName,Grade FROM SubjectPI WHERE RegNo='" & CInt(HttpContext.Current.Session("userName")) & "' AND Status='Fail' AND Semester='" & i - 2 & "'")
i = i - 2
Loop
lvBackSubjects.DataSource = _tableBackLogs
lvBackSubjects.DataBind()
这样做只绑定i
提供给ListView
.I want all the data.Suppose的最后一个值的数据i=5
。所以我希望ListView
有数据。i=3,1
希望我不会让你们感到困惑。