Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
    Overview
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Concepts
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Collapse]Layout
      How to: Configure the Page Layout Programmatically
      How to: Create a Three-Column Layout with Uniform Columns
      How to: Insert Page Numbers in Header or Footer
      How To: Add Line Numbering
      How to: Set Background Color for the Line Number Column
      How to: Count the Lines in the Document
      How to: Improve the Display and Printout Appearance with the LayoutUnit Property
    [Expand]Automation
    [Expand]Search and Replace
    [Expand]Mail Merge
    [Expand]Spell Check
    [Expand]Export-Import
    [Expand]Printing
    [Expand]Protection
    [Expand]User Interface Customization
    [Expand]Miscellaneous
    [Expand]Commands
   [Expand]Member Tables
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Insert Page Numbers in Header or Footer

While editing the document's header or footer, you can insert fields specifying the current page number, or the total number of pages in a document. To accomplish this, use the corresponding command bar buttons, as illustrated in the picture below:

Another method is to insert the field manually, using the following steps:

  1. Enter the header/footer editing mode. For this, double click in the existing header or footer, or use the command button to insert a new one.
  2. Press the CTRL+F9 key combination to insert a field. A pair of braces appears, indicating the code range of the field. Type in 'page' to denote a page number or a 'numpages', for the total number of pages in the document.
  3. Right-click the field and select 'Update Field' command in the context menu.

How would you rate this topic?​​​​​​​