Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial

Page Field

Inserts the current page number.

In order to update the field within the TOC field you need to set the FlowExtensibilityManager.NumberingFieldsProvider.

Field Syntax

This is how the syntax of a Page field looks like:

Syntax
{ PAGE [\*Format Switch] }

Switches

Switches are a way for the code fragment to specify formatting for the result of the field. More information is available in the Syntax and Switches section of the Fields article.

The possible switches for a Page field are:

Switch Description
\* Format Switch Optional switch that specifies the format

Inserting

Inserting this field is easily achieved through the RadFlowDocumentEditor's InsertField() method. It accepts code as first argument and result as second argument.

Example 1 demonstrates how you can insert a date field.

Example 1: Insert page field

editor.InsertText("Page "); 
editor.InsertField("PAGE", ""); 
editor.InsertText(" of "); 
editor.InsertField("NUMPAGES", ""); 

After updating the field the result would be "Page 3 of 6" (check Updating Fields).

See Also

In this article