Pagination control in Asp.net

Source: Internet
Author: User

I just want to remind myself, for fear that I will not remember it in the future.

The definition in aspx is as follows. pagesize = 10 indicates that 10 entries are displayed on each page,

<Div style = "width: 1024px; Height: 20px; margin-top: 5px; font-size: 10pt; text-align: Center">
<Asp: datapager pagedcontrolid = "lvkoteilist" id = "datapager1" pagesize = "10" runat = "server">
<Fields>
<Asp: nextpreviouspagerfield buttontype = "Link" showfirstpagebutton = "true"

Firstpagetext = "Initially" shownextpagebutton = "false" showpreviouspagebutton = "false"/>
<Asp: numericpagerfield/>
<Asp: nextpreviouspagerfield buttontype = "Link" showlastpagebutton = "true"

Lastpagetext = "last" shownextpagebutton = "false" showpreviouspagebutton = "false"/>
</Fields>
</ASP: datapager>
</Div>

In the design screen, you can also choose whether to use numbers or front and back representation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.