MaysamSh

Untitled

Aug 4th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1.         Try
  2.  
  3.             Conn.Open()
  4.             Dim DA As SqlDataAdapter = New SqlDataAdapter(TempSQLCommand, Conn)
  5.             Dim DT As DataTable = New DataTable()
  6.             DA.Fill(DT)
  7.  
  8.             Dim objPds As PagedDataSource = New PagedDataSource()
  9.             objPds.DataSource = DT.DefaultView
  10.  
  11.             objPds.AllowPaging = True
  12.  
  13.             objPds.PageSize = iPageSizeCount
  14.  
  15.             Dim curpage As Integer = iCurrenPage
  16.  
  17.             objPds.CurrentPageIndex = iCurrenPage - 1
  18.  
  19.             SetNewsArchivePageCount = objPds.PageCount
  20.  
  21.             iRepeater.DataSource = objPds
  22.             iRepeater.DataBind()
  23.             Conn.Close()
  24.             SetActionResult = "done_NewsArchive"
  25.         Catch exp As Exception
  26.             SetErrorMessage = exp.Message
  27.             SetActionResult = "error_NewsArchive"
  28.             Conn.Close()
  29.  
  30.         End Try
Advertisement
Add Comment
Please, Sign In to add comment