`
Yarhhome
  • 浏览: 47794 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论
  • Yarhhome: tpsnake 写道大哥,你的帖子没让我折服,你的 头像让我折 ...
    禁止缓存
  • tpsnake: 大哥,你的帖子没让我折服,你的 头像让我折服了
    禁止缓存

datatable 的妙用

 
阅读更多

        Dim dt As DataTable = ViewState("datasource")

        Dim source As New DataTable
        source = dt.Clone

        For i As Integer = (index - 1) * pagesize To index * pagesize - 1
            If dt.Rows(i) IsNot Nothing Then

                source.ImportRow(dt.Rows(i))


            Else
                Exit For
            End If
        Next

 

这样就能取到某几行数据了,十分强大

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics