ASP.NET paging component 0.1.0

zhaozj2021-02-08  513

Modify the previous ASCX user component, adapted to true components, used to make custom pactions in ASP.NET, and to match the stored procedures, which can provide efficient paging feature.

Attributes:

Number: Total record;

PageSize: The number is displayed per page;

CurrentPage: Current page number (read only)

event:

Trigger the pagechanged event when turning pages;

Demonstration code:

public class WebForm1: System.Web.UI.Page {protected AspControls.PageUpDown PageUpDown2; private void Page_Load (object sender, System.EventArgs e) {if (! Page.IsPostBack) {PageUpDown2.Number = 300; PageUpDown2.PageSize = 30 }}

Private void PageUpdown1_pageChanged (Object Sender, System.EventArgs E) {response.write (pageupdown2.currentpage);}

override protected void OnInit (EventArgs e) {this.PageUpDown2.PageChanged = new AspControls.PageUpDown.PageEventHandler (this.PageUpDown1_PageChanged); this.Load = new System.EventHandler (this.Page_Load);}}

Display effect: (CSS is defined by page)

download

转载请注明原文地址:https://www.9cbs.com/read-356.html

New Post(0)