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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Page Size

Page Size

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelp
9 Posts 6 Posters 1 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.
  • S Offline
    S Offline
    Socheat Net
    wrote on last edited by
    #1

    Can anyone help me? I currently using (ASP.NET + VB.NET) with Database (Ms Access) , i have retrive record with command "ExecuteReader()" after this it will show all record depend on database, but want to display 10 reocrds per page, please help me    Thanks      Socheat

    ................

    N V 2 Replies Last reply
    0
    • S Socheat Net

      Can anyone help me? I currently using (ASP.NET + VB.NET) with Database (Ms Access) , i have retrive record with command "ExecuteReader()" after this it will show all record depend on database, but want to display 10 reocrds per page, please help me    Thanks      Socheat

      ................

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Use a datagrid and set the pagesize as 10 for the datagrid. Then bind the datagrid. Note that if you are using datareader , you can't do paging in datagrid. For that use datasets.


      printf("Navaneeth!!") www.w3hearts.com

      S 1 Reply Last reply
      0
      • S Socheat Net

        Can anyone help me? I currently using (ASP.NET + VB.NET) with Database (Ms Access) , i have retrive record with command "ExecuteReader()" after this it will show all record depend on database, but want to display 10 reocrds per page, please help me    Thanks      Socheat

        ................

        V Offline
        V Offline
        varshavmane
        wrote on last edited by
        #3

        First make AllowPaging="True" and PageSize="10" and use this: Protected Sub GridViewUser_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridViewUser.PageIndexChanging Try GridView1.PageIndex = e.NewPageIndex() BindGridView()'Bind GridView Catch ex As Exception End Try End Sub Hope this helps u...

        S 1 Reply Last reply
        0
        • N N a v a n e e t h

          Use a datagrid and set the pagesize as 10 for the datagrid. Then bind the datagrid. Note that if you are using datareader , you can't do paging in datagrid. For that use datasets.


          printf("Navaneeth!!") www.w3hearts.com

          S Offline
          S Offline
          Socheat Net
          wrote on last edited by
          #4

          What about ASPRepeater, can i use pagesize, if can help give me an example. Thanks Socheat

          ................

          C 1 Reply Last reply
          0
          • V varshavmane

            First make AllowPaging="True" and PageSize="10" and use this: Protected Sub GridViewUser_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridViewUser.PageIndexChanging Try GridView1.PageIndex = e.NewPageIndex() BindGridView()'Bind GridView Catch ex As Exception End Try End Sub Hope this helps u...

            S Offline
            S Offline
            Socheat Net
            wrote on last edited by
            #5

            I don't understand, what is GirdView1? if i using ASPRepeater, where i can use next link or previou?

            ................

            K S 2 Replies Last reply
            0
            • S Socheat Net

              What about ASPRepeater, can i use pagesize, if can help give me an example. Thanks Socheat

              ................

              C Offline
              C Offline
              Chetan Ranpariya
              wrote on last edited by
              #6

              Hi, Repeater doesnt support paging. so better u use datagrid of gridview as both of them having functionality of paging which reduce a lot of coding overhead. And if you are stick to use repeater then you have to put separate linkbuttons to navigate between pages and write your own logic to fetch data from the database to display in the page. This idea is I think not good to implement as per my experience. I hope you got the idea. Thanks and Regards, Chetan Ranpariya

              1 Reply Last reply
              0
              • S Socheat Net

                I don't understand, what is GirdView1? if i using ASPRepeater, where i can use next link or previou?

                ................

                K Offline
                K Offline
                Kunal P
                wrote on last edited by
                #7

                a gridview control is found in the ASP 2.0 version under the "Data" header of the toolbox. if u r using ASP 1.1 the name would be "Datagrid". these controls are pre coded to display data, allowing you to page, and even support update commands directly.. A repeater is a type of a template control, wherein you specify the look and feel of the control, and along with it do pretty much coding to display data.and the paging functionality would also have to be coded... so, its recommended to use the DATAGRID or GRIDVIEW.. i hope u get the idea now..

                Kunal

                S 1 Reply Last reply
                0
                • S Socheat Net

                  I don't understand, what is GirdView1? if i using ASPRepeater, where i can use next link or previou?

                  ................

                  S Offline
                  S Offline
                  Sandeep Akhare
                  wrote on last edited by
                  #8

                  GridView control is present in the ASP.NET 2.0 which replaced datagrid control in ASP.NET 1.1 Yes you can use repeater control for the same

                  Thanks and Regards Sandeep If you want something you never had, do something you have never done!

                  1 Reply Last reply
                  0
                  • K Kunal P

                    a gridview control is found in the ASP 2.0 version under the "Data" header of the toolbox. if u r using ASP 1.1 the name would be "Datagrid". these controls are pre coded to display data, allowing you to page, and even support update commands directly.. A repeater is a type of a template control, wherein you specify the look and feel of the control, and along with it do pretty much coding to display data.and the paging functionality would also have to be coded... so, its recommended to use the DATAGRID or GRIDVIEW.. i hope u get the idea now..

                    Kunal

                    S Offline
                    S Offline
                    Socheat Net
                    wrote on last edited by
                    #9

                    Yes i got it now, if i have more i'll contact u. Socheat

                    ................

                    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