TX Text Control .NET Server

Remove Method

Method|Introduced in 28.0
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

Removes that ConditionalInstruction element from the collection and the document, where the Name property value equals the specified name.

Syntax

public bool Remove(string name);

Parameters

ParameterDescription
name

Specifies the name of the ConditionalInstruction element to remove.

Return Value

The return value is true, if the specified ConditionalInstruction element was found and removed. Otherwise false. A ConditionalInstruction element won't be removed, if the TextControl.IsFormFieldValidationEnabled property is set to false or the TextControl.EditMode is set to EditMode.ReadAndSelect and TextControl.DocumentPermissions.ReadOnly to true.

Examples

The following example removes an item from the conditional instruction collection.

if (conditionalInstructionCollection.Remove("CustomerName"))
{
    Console.WriteLine("Remove completed successfully.");
}