Fork me on GitHub

AspNetPager demo - Current page button position

This sample demonstrates how to set the current page button position.

Default (CurrentPageButtonPosition=PagingButtonPosition.Fixed):


FirstPrev...11121314151617181920...NextLast  Go To Page:


CurrentPageButtonPosition=PagingButtonPosition.Beginning:

12345678910...NextLast  Go To Page:


CurrentPageButtonPosition=PagingButtonPosition.Center:

FirstPrev...111213141516171819...NextLast  Go To Page:


CurrentPageButtonPosition=PagingButtonPosition.End:

FirstPrev...10111213141516171819...NextLast  Go To Page:

CurrentPageButtonPosition.aspx:

<pre>Default (CurrentPageButtonPosition=PagingButtonPosition.Fixed):</pre><br />
        <br /><webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" TextBeforePageIndexBox="Go To Page: " 
        PageSize="10" RecordCount="299" CurrentPageIndex="19" FirstPageText="First" LastPageText="Last" NextPageText="Next" PrevPageText="Prev">
        </webdiyer:AspNetPager><br />
        <hr /><b>CurrentPageButtonPosition=PagingButtonPosition.Beginning:</b><br />
        <br /><webdiyer:AspNetPager ID="AspNetPager2" runat="server" Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" TextBeforePageIndexBox="Go To Page: " 
        PageSize="10" RecordCount="299" ShowDisabledButtons="false" CurrentPageButtonPosition="Beginning" FirstPageText="First" LastPageText="Last" NextPageText="Next" PrevPageText="Prev">
        </webdiyer:AspNetPager><br />
        <hr /><b>CurrentPageButtonPosition=PagingButtonPosition.Center:</b><br />
        <br /><webdiyer:AspNetPager ID="AspNetPager3" runat="server" Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" TextBeforePageIndexBox="Go To Page: " 
        PageSize="10" RecordCount="299" CurrentPageButtonPosition="Center" CurrentPageIndex="15" NumericButtonCount="9" FirstPageText="First" LastPageText="Last" NextPageText="Next" PrevPageText="Prev">
        </webdiyer:AspNetPager><br />
        <hr /><b>CurrentPageButtonPosition=PagingButtonPosition.End</b>: <br />
        <br /><webdiyer:AspNetPager ID="AspNetPager4" runat="server" Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" TextBeforePageIndexBox="Go To Page: " 
        PageSize="10" RecordCount="299" CurrentPageButtonPosition="End" CurrentPageIndex="19" FirstPageText="First" LastPageText="Last" NextPageText="Next" PrevPageText="Prev">
        </webdiyer:AspNetPager>