- 基本功能
- 分页按钮属性效果
- 使用自定义信息区
- Repeater分页
- DataList分页
- Url分页
- Url重写
- Url逆向分页
- n层结构应用
- 使用Xml文件数据源
- 图片浏览示例
- AccessDataSource分页
- SqlDataSource分页
- ObjectDataSource分页
- 自定义数据呈现逻辑
- 使用图片按钮
- 查询结果分页
- 查询结果Url分页
- 克隆属性及事件
- 页索引输入/选择框
- 自定义导航按钮
- 在用户控件中实现分页
- UpdatePanel支持
- 设置当前页按钮位置
- 使用Table布局
- 自定义提交按钮图片
- 从Url中获取每页显示记录数
- 应用CSS样式
- 使用GoToPage方法
- 分页导航元素布局
- 类:
- 属性:
- AlwaysShow
- AlwaysShowFirstLastPageNumber
- BackImageUrl
- ButtonImageAlign
- ButtonImageExtension
- ButtonImageNameExtension
- CloneFrom
- CpiButtonImageNameExtension
- CssClass
- CurrentPageButtonClass
- CurrentPageButtonPosition
- CurrentPageButtonStyle
- CurrentPageButtonTextFormatString
- CurrentPageIndex
- CustomInfoClass
- CustomInfoHTML
- CustomInfoSectionWidth
- CustomInfoStyle
- CustomInfoTextAlign
- DisabledButtonImageNameExtension
- EnableTheming
- EnableUrlRewriting
- EndRecordIndex
- FirstPageText
- FirstPageUrlRewritePattern
- HorizontalAlign
- ImagePath
- InvalidPageIndexErrorMessage
- LastPageText
- LayoutType
- MoreButtonType
- NavigationButtonsPosition
- NavigationButtonType
- NavigationToolTipTextFormatString
- NextPageText
- NumericButtonCount
- NumericButtonTextFormatString
- NumericButtonType
- PageCount
- PageIndexBoxClass
- PageIndexBoxStyle
- PageIndexBoxType
- PageIndexOutOfRangeErrorMessage
- PageSize
- PagesRemain
- PagingButtonLayoutType
- PagingButtonSpacing
- PagingButtonType
- PrevPageText
- RecordCount
- RecordsRemain
- ReverseUrlPageIndex
- ShowBoxThreshold
- ShowCustomInfoSection
- ShowDisabledButtons
- ShowFirstLast
- ShowMoreButtons
- ShowNavigationToolTip
- ShowPageIndex
- ShowPageIndexBox
- ShowPrevNext
- SkinID
- StartRecordIndex
- SubmitButtonClass
- SubmitButtonImageUrl
- SubmitButtonStyle
- SubmitButtonText
- TextAfterPageIndexBox
- TextBeforePageIndexBox
- UrlPageIndexName
- UrlPageSizeName
- UrlPaging
- UrlPagingTarget
- UrlRewritePattern
- 方法:
- 事件:
- 枚举:
- 委托:
AspNetPager 示例 - 分页导航元素布局
该示例演示如何设置AspNetPager分页导航元素的布局。
PagingButtonLayoutType.aspx:
<%@ Page Title="分页导航元素布局" Language="C#" MasterPageFile="AspNetPager.master" MetaDescription="该示例演示如何设置AspNetPager分页导航元素的布局。" AutoEventWireup="true" Inherits="PagingButtonLayoutType_Default" Codebehind="PagingButtonLayoutType.aspx.cs" %> <asp:Content ID="Content2" ContentPlaceHolderID="main" Runat="Server"> 从7.2版起,可以将AspNetPager分页导航元素(上页、下页、首页、尾页和数字页索引)嵌套在无序列表<li>或<span>标签中,以方便应用一些比较流行的分页样式(可以查看本页面的html源文件对比PagingButtonLayoutType不同的属性值输出的不同结果):<br /> <h4>分页导航元素不嵌套在任务标签中(默认):</h4> <webdiyer:AspNetPager ID="AspNetPager3" runat="server" RecordCount="299"> </webdiyer:AspNetPager> <hr /> <h4>将分页导航元素嵌套在<span>与</span>标签中(未应用样式):</h4> 属性设置:<span class="code">PagingButtonLayoutType="Span"</span><br /> <webdiyer:AspNetPager ID="AspNetPager2" runat="server" PagingButtonLayoutType="Span" RecordCount="299" UrlPaging="True" UrlPageIndexName="pi" PageIndexBoxType="DropDownList"> </webdiyer:AspNetPager> <hr /> <h4>将分页导航元素嵌套在<li>与</li>标签中(未应用样式):</h4> 属性设置:<span class="code">PagingButtonLayoutType="UnorderedList"</span><br /> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PagingButtonLayoutType="UnorderedList" RecordCount="299" UrlPaging="True"> </webdiyer:AspNetPager> </asp:Content>
PagingButtonLayoutType.aspx.cs:
using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class PagingButtonLayoutType_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } }