Using webdiyer: aspnetpager (aspnetpager. dll)

Source: Internet
Author: User

1 Add the control in ASPX page:

<Webdiyer: aspnetpager id = "aspnetpager1" runat = "server" cssclass = "hui_01" showinputbox = "always" showpageinfo = "before"
Horizontalalign = "center"> </webdiyer: aspnetpager>

Note: An input box can appear in showinputbox, specifying the jump page;

2. CS

Dataset DS = brpager. loadlist (PAGER, ref allcount );

// Allcount is used to receive the total number of records

If (Dt. Rows. Count> 0)
{

This. aspnetpager1.firstpagetext = "first page ";
This. aspnetpager1.lastpagetext = "last page ";
This. aspnetpager1.nextpagetext = "next page ";
This. aspnetpager1.prevpagetext = "Previous Page ";
This. aspnetpager1.textbeforepager = "Total number of records:" + allcount. tostring ();
This. aspnetpager1.pagesize = pagesize;
This. aspnetpager1.pagebuttoncount = 4;
This. aspnetpager1.recordcount = allcount;
}

3. The aspnetpager1 page flip event mainly refers to the number of pages to be displayed.

This. aspnetpager1.pagechanged + = new Wuqi. webdiyer. pagechangedeventhandler (this. aspnetpager1_pagechanged );

private void aspnetpager1_pagechanged (Object SRC, Wuqi. webdiyer. pagechangedeventargs e)
{< br> This. aspnetpager1.currentpageindex = E. newpageindex;
loadinfolist (this. getcondition (), E. newpageindex);
}

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.