# ConditionalInstruction.Name Property

> Gets or sets a name of the conditional instruction.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ConditionalInstruction.Name Property
- **636 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/name-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/name-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/name-property/llms-full.txt

---

### Description

Gets or sets a name of the conditional instruction.

### Syntax

```csharp
public string Name { get; set; }
```

```vbnet
Public Property Name As String
```

### Examples

The following example builds a rule around an approval check box in a fillable form by using `ConditionalInstruction.Name`.

```csharp
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
ConditionalInstruction conditionalInstruction = new();

conditionalInstruction.Name = "ConditionalInstruction1";
if (!string.IsNullOrWhiteSpace(conditionalInstruction.Name))
{
    Console.WriteLine($"Name: {conditionalInstruction.Name}");
}
```

```vbnet
Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim conditionalInstruction As New ConditionalInstruction()

conditionalInstruction.Name = "ConditionalInstruction1"
If Not String.IsNullOrWhiteSpace(conditionalInstruction.Name) Then
    Console.WriteLine($"Name: {conditionalInstruction.Name}")
End If
```

### Remarks

A `System.ArgumentException` is thrown if the set value is null, an empty string or the name of another `ConditionalInstruction` object inside the [ConditionalInstructionCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstructioncollection/llms-full.txt) where this object is part of it.

---

## Nearby

- **Previous:** [ConditionalInstruction.Instructions Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/instructions-property/llms-full.txt)
- **Next:** [ConditionalInstructionCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstructioncollection/llms-full.txt)
