TX Text Control .NET Server

GetItem 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

Gets that ConditionalInstruction element from the collection, where the Name property value equals the specified name.

Syntax

public ConditionalInstruction GetItem(string name);

Parameters

ParameterDescription
name

Specifies the name of the requested ConditionalInstruction element.

Return Value

The return value is null, if the TextControl.IsFormFieldValidationEnabled property is set to false or the collection does contain a ConditionalInstruction element with the specified name. Otherwise, the return value is an object of the type ConditionalInstruction with the specified name.

Examples

The following example retrieves item from the conditional instruction collection.

var result = conditionalInstructionCollection.GetItem("CustomerName");
Console.WriteLine($"Get Item result: {result}");