# Instruction.IsElseInstructionEnabled Property

> Gets or sets a value indicating whether this Instruction allows to execute else instructions. If this property is set to true, the else instruction value is applied by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are not fulfilled. The default value is false, if no else instruction value was set by the instruction constructor. Otherwise true.

- **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 > Instruction.IsElseInstructionEnabled Property
- **698 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/iselseinstructionenabled-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/iselseinstructionenabled-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/iselseinstructionenabled-property/llms-full.txt

---

### Description

Gets or sets a value indicating whether this `Instruction` allows to execute else instructions. If this property is set to true, the [else instruction value](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/elseinstructionvalue-property/llms-full.txt) is applied by the specified action when the defined requirements of the `ConditionalInstruction.Conditions` array are not fulfilled. The default value is false, if no [else instruction value](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/elseinstructionvalue-property/llms-full.txt) was set by the instruction constructor. Otherwise true.

### Syntax

```csharp
public bool IsElseInstructionEnabled { get; set; }
```

```vbnet
Public Property IsElseInstructionEnabled As Boolean
```

### Examples

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

```csharp
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
Instruction instruction = new(approvalField, Instruction.InstructionTypes.IsEnabled, true);

instruction.IsElseInstructionEnabled = true;
if (instruction.IsElseInstructionEnabled)
{
    Console.WriteLine("Instruction: Is Else Instruction Enabled is enabled.");
}
```

```vbnet
Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim instruction As New Instruction(approvalField, Instruction.InstructionTypes.IsEnabled, True)

instruction.IsElseInstructionEnabled = True
If instruction.IsElseInstructionEnabled Then
    Console.WriteLine("Instruction: Is Else Instruction Enabled is enabled.")
End If
```

---

## Nearby

- **Previous:** [Instruction.InstructionValue Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/instructionvalue-property/llms-full.txt)
- **Next:** [Instruction.IsFormFieldChangeInstruction Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/instruction/isformfieldchangeinstruction-property/llms-full.txt)
