Dim nms() As String
With wb.AddTable("","Table1")
.Highlight = 1 '关闭高亮显示 1只显示行
.PageNumber = page '设置页码
.Primarykey = "openid" '设置主键
.ActiveSheet = "menu" '设置菜单
.Head.AddRow("昵称","性别","城市","识别号","授权")
.Attribute = "class='tablehead'"
Dim drs As List(Of DataRow) = dt.Select("","subscribe_time desc")
msgbox(drs.Count)
If drs.Count > 0 Then
Dim y,m As Integer
Dim dt1,dt2 As Date
Dim r As DataRow = drs(0)
With .Body.AddRow(r("昵称"),r("性别"),r("城市"),r("识别号"),r("授权"))
.Primarykey = r("openid") '设置主键
.Attribute = "class='mark'"
End With
For i As Integer = 1 To drs.count - 1
r = drs(i)
Dim lr As DataRow = drs(i-1)
With .Body.AddRow(r("昵称"),r("性别"),r("城市"),r("识别号"),r("授权"))
.Attribute = "class='mark'"
.Primarykey = r("openid") '设置主键
End With
Next
End If
End With
With wb.AddButtonGroup("","btg2", False) '生成上一页和下一页按钮
If page > 0 Then
.Add("btnPrev", "上一页","","List.htm?page=" & page - 1)
End If
If Endrow < count Then
.Add("btnNext", "下一页","","List.htm?page=" & page + 1)
End If
End With
wb.AppendHTML("<script src='./lib/table.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
另外看看:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=160112,3楼