TX Text Control .NET Server

Text Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets a string containing the currently selected text.

Syntax

public string Text { get; set; }

Examples

The following example formats the heading of a short document by using Selection.Text.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.Text = "Quarterly results";
if (!string.IsNullOrWhiteSpace(selection.Text))
{
    Console.WriteLine($"Text: {selection.Text}");
}

Limitations

Runtime only.

Further Reading

  • MailMerge: Merge Hyperlinks into Merge Fields –
  • Reporting: Conditional Formatted Text Blocks –
  • Restart the Page Numbering Fields Per Section –
  • Inserting MS Word Compatible Page Number Fields –