473,471 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

who to make paging by asp.net + vb?

2 New Member
hi
i was make data load from my database but the product to much (not gust one it's 100 product)
who can i make gust in one page 10 product and make button for "Next Page and privet page"

this code for data load

Expand|Select|Wrap|Line Numbers
  1.   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2.         Dim st As String
  3.  
  4.         Try
  5.  
  6.             mycon.Open()
  7.             Dim sqlselect As String = "select * from TblPhoto"
  8.             Dim cmd As New SqlCommand(sqlselect, mycon)
  9.             Dim rdr As SqlDataReader = cmd.ExecuteReader
  10.  
  11.             If Not rdr.HasRows Then
  12.                 Label1.Text = "no data"
  13.             End If
  14.  
  15.             While rdr.Read
  16.                 DropDownList1.Items.Add(rdr.Item(1))
  17.  
  18.                 st &= "<table border=1 width=300px>" & "<tr><td>" & rdr.Item(1).ToString & "</td></tr><tr><td>" & rdr.Item(2).ToString & "</td>"
  19.  
  20.             End While
  21.  
  22.  
  23.         Catch ex As Exception
  24.             Label1.Text = Err.Description
  25.  
  26.         Finally
  27.  
  28.             mycon.Close()
  29.             Literal1.Text = st
  30.         End Try
  31.  
  32.     End Sub
Jan 5 '11 #1
1 1586
semomaniz
210 Recognized Expert New Member
you can use pageddatasource to handle the data and then you need to implement your own paging code. you can find may examples if you google it
Jan 27 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Max | last post by:
Is it possible or more effecient to use a stored procedure to populate a datagrid when using datagrid or custom paging? Is it (ADO.NET?) pulling the entire table into the dataset or is it just...
1
by: Quentin Huo | last post by:
Hi, There is a page in my project which is just to list the all article titles by paging (20 titles per page). So I think it might be more efficient using SqlDataReader instead of DataSet. But...
2
by: ven | last post by:
hello i have datagrid who may take data from two sources : 1. dropdown list with categories of items - when client choose category then items are displayed in datagrid usin select from 2....
2
by: RJN | last post by:
Hi Sorry for posting again. I have a datagrid which is put inside a div tag to make it scrollable. I need to page the datagrid. The page numbers appear at the bottom of the datagrid and has...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
2
by: serge calderara | last post by:
Dear all, I have an asp net 1.1 application with a datagrid bind to a datasource I am using tablemappings features to display column grids name I am using paging features which shows 10 pages at...
8
by: AG | last post by:
ASP.NET 2.0, VS 2005 I have a gridview with paging enabled, bound to an objectdatasource. Both were dropped on to the page and configured via the wizards. Basically working as expected. The...
1
by: maheshkumar908 | last post by:
hi can any body tell me about the paging with full code. i have lot of problem in paging so plz help me.
3
osward
by: osward | last post by:
Hi, everyone, I had managed to make use of the date link from a simple calendar script to my query table. When I click on the date's link or Prev and Next Month link, The table first row will be...
8
tharden3
by: tharden3 | last post by:
Hey all, I need some help with PHP code for paging my products on my site. I posted questions asking for help in the past, and was directed to this tutorial for help. The code that the tutorial gives...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.