# DocumentTarget.Name Property

> Relates a user-defined name to a target, that can be any kind of text in addition to the target's TargetName.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 for WPF > Reference > TXTextControl > DocumentTarget.Name Property
- **516 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/name-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/name-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/name-property/llms-full.txt

---

### Description

Relates a user-defined name to a target, that can be any kind of text in addition to the target's [TargetName](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/targetname-property/llms-full.txt).

### Syntax

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

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

### Examples

The following example creates a named destination for an internal document link by using `DocumentTarget.Name`.

```csharp
DocumentTarget documentTarget = new("CustomerDetails");
textControl.DocumentTargets.Add(documentTarget);

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

```vbnet
Dim documentTarget As New DocumentTarget("CustomerDetails")
textControl.DocumentTargets.Add(documentTarget)

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

---

## Nearby

- **Previous:** [DocumentTarget.ID Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/id-property/llms-full.txt)
- **Next:** [DocumentTarget.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/scrollto-method/llms-full.txt)
