TX Text Control .NET Server

Clear Method

Method|Introduced in 12.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Clears the selected text or the character right from the current input position.

Syntax

public void Clear();

Examples

The following example clears the current document only when it contains content.

if (textControl.Text.Length > 0)
{
    textControl.Clear();
}