Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
Dim flt As String = e.Cookies("yjbb")
If flt = "" Then
If e.PostValues.ContainsKey("product") Then
flt &= "年级 = '" & e.PostValues("product") & "'"
End If
……原来生成条件的其他代码
wb.AppendCookie("yjbb",flt)
End If
Dim page As Integer = 0 '默认page为0,显示第一页
Dim pageRows As Integer = 10 '每页10行
If e.GetValues.ContainsKey("page") Then '如果地址中有page参数
Integer.TryParse(e.GetValues("page"), page) '提取page参数
End If
Dim StartRow As Integer = page * pageRows + 1 '此页第一行
Dim EndRow As Integer = (page + 1) * pageRows '此页最后一行
''提取此页数据
Dim cmd As New SQLCommand
cmd.C '记得设置数据源名称
Dim yjbb As String '定义一个变量,为excel报表传递查询条件
cmd.CommandText = "Select Count(*) From {控缀保学}"
''msgbox(3)
If flt > "" Then
cmd.CommandText = cmd.CommandText & "where" & flt
End If
Dim Count As Integer = cmd.ExecuteScalar() '获取总的行数
……