473,569 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to show paging like this?

254 Contributor
Hi

I have done paging for my php pages like this

PREV | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| NEXT.

what I want that it should display first five links i.e. PREV | 1| 2| 3| 4| 5| NEXT and user will click say 2 it should display PREV | 1| 2| 3| 4| 5| 6| NEXT

Hey like in Google pages.

so how can I do that?

Thanks!
Dec 5 '08 #1
5 1475
pradeepjain
563 Contributor
where is your data that need to be paginated in DB or something else
Dec 5 '08 #2
nathj
938 Recognized Expert Contributor
When you write out page 3 (page 2 would be the same as page 1) you need write out the links again to go up by a certain number from the current number-1.
Dec 5 '08 #3
pradeepjain
563 Contributor
And ya if the data is in DB ,you can limit the number of entries in a page by LIMIT ,and so .
Dec 6 '08 #4
nashruddin
25 New Member
or simply use this <link removed>.
Dec 7 '08 #5
Markus
6,050 Recognized Expert Expert
@nashruddin
Please do not self-promote or link people to complete source code, especially without any explanation to that code.

Moderator.
Dec 7 '08 #6

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

Similar topics

0
2719
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update not the whole page, but a portion of the page. Strangely enough the URL below ...
3
2544
by: jcfilth | last post by:
Hello, I have created an asp.net web page with 3 datagrids. Every datagrid binds to a diferent sql query, against a sql server. I first bind one, then the other and then the last, all using code on Page_Load event. When I load this page, the navigator doesn't show anything until the page load finish. Then I can see the results of the 3...
2
1411
by: Guoqi zheng | last post by:
Dear sir, I am using the default paging function of datagrid. Below is my code. <PagerStyle NextPageText="&gt;&gt;&gt;" PrevPageText="&lt;&lt;&lt;" HorizontalAlign="Center" Mode="NumericPages"></PagerStyle> It works fine, it show a 1 2 3 4 5 page nr. at the bottom of datagrid. However, what I want is that before 1 2 3 4 5, I would like to show a...
5
1702
by: Patrick.O.Ige | last post by:
Hi Guys, I have a datagrid wit editing and updating. But after adding Paging IT WON'T PAGE!! It compiles well but when i click on the paging link it doesn't go to the next link.. When i remove AllowCutomPaging it gives error:- "AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid with ID MenuGrid when AllowPaging...
2
2212
by: asad | last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom paging bcoz data is too heavy so pls tell me how can i use custom paging in ASP.NET Thanks
2
6440
by: farhad13841384 | last post by:
Hi , I Hope You fine. I have some problem with this code for paging in asp.net this bottom code work correctly without any error but when I try to place separate code in .VB file then error is begin and occured .I want to separate this code and compiling .vb code using VBC.exe later .(bin/paging.dll) when do it like me so you retrive only <...
0
1118
by: Nathan Sokalski | last post by:
I have a very simple FormView control, but when I view the page it does not show the Paging controls, although it does show the data. Here is my code: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FormViewTest.aspx.vb" Inherits="family.FormViewTest" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
6
1836
by: Nathan Sokalski | last post by:
I have tried everything I can think of, I have even tried copying examples from books and websites I have found, but every Formview control that I have tried to create does not show the Paging controls. The first record from the DataSource is displayed, but not the Paging controls. I have tried doing it with both automatically generated Paging...
2
1918
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a particular order (like ProductID, Name, Description, Quantity etc.) are displayed in one DataGrid where as the personal details of the buyer...
5
3202
by: Donald Adams | last post by:
Hi, I will have both web and win clients and would like to page my data. I could not find out how the datagrid control does it's paging though I did find some sample code that says they do it this way, but I can't see these methods as public. BookmarksDataSetTableAdapters.BookmarksTableAdapter bookTA = new...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.