Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Cant paging

Cant paging

Scheduled Pinned Locked Moved Visual Basic
design
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tan873
    wrote on last edited by
    #1

    Protected Sub btnReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReport.Click Dim dtbTable As DataTable = New DataTable Dim strSQL As String Dim adtSelect As SqlDataAdapter Dim srt1`As String srt1`= TextBox1.Text strSQL = "select * from table1" adtSelect = New SqlDataAdapter(strSQL, conDB) adtSelect.Fill(dtbTable) gridview.DataSource = dtbTable gridview.DataBind() Catch ex As Exception Response.Write(ex.Message.ToString) Finally conDB.Close() End Try End Sub Protected Sub gridview_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gridview_PageIndexChanging gridview.PageIndex = e.NewPageIndex gridview.DataBind() End Sub

    L 1 Reply Last reply
    0
    • T tan873

      Protected Sub btnReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReport.Click Dim dtbTable As DataTable = New DataTable Dim strSQL As String Dim adtSelect As SqlDataAdapter Dim srt1`As String srt1`= TextBox1.Text strSQL = "select * from table1" adtSelect = New SqlDataAdapter(strSQL, conDB) adtSelect.Fill(dtbTable) gridview.DataSource = dtbTable gridview.DataBind() Catch ex As Exception Response.Write(ex.Message.ToString) Finally conDB.Close() End Try End Sub Protected Sub gridview_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gridview_PageIndexChanging gridview.PageIndex = e.NewPageIndex gridview.DataBind() End Sub

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Please refer to this http://www.codeproject.com/Messages/1278601/How-to-get-an-answer-to-your-question.aspx[^] for tips on how to ask a question. This is just an unformatted code dump that everyone will just ignore.

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups