# DocumentLink.DocumentTarget Property

> Gets or sets an object of the type DocumentTarget specifying to where the link points. If such an object does not exist, the property returns null.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **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 > DocumentLink.DocumentTarget Property
- **608 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentlink/documenttarget-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentlink/documenttarget-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentlink/documenttarget-property/llms-full.txt

---

### Description

Gets or sets an object of the type DocumentTarget specifying to where the link points. If such an object does not exist, the property returns null.

### Syntax

```csharp
public DocumentTarget DocumentTarget { get; set; }
```

```vbnet
Public Property DocumentTarget As DocumentTarget
```

### Examples

The following example creates an internal link to the customer-details destination by using `DocumentLink.DocumentTarget`.

```csharp
DocumentTarget target = new("CustomerDetails");
textControl.DocumentTargets.Add(target);
DocumentLink documentLink = new("View customer details", target);
textControl.DocumentLinks.Add(documentLink);

documentLink.DocumentTarget = new DocumentTarget("CustomerName");
if (documentLink.DocumentTarget != null)
{
    Console.WriteLine("Document Link: Document Target is available.");
}
```

```vbnet
Dim target As New DocumentTarget("CustomerDetails")
textControl.DocumentTargets.Add(target)
Dim documentLink As New DocumentLink("View customer details", target)
textControl.DocumentLinks.Add(documentLink)

documentLink.DocumentTarget = New DocumentTarget("CustomerName")
If documentLink.DocumentTarget IsNot Nothing Then
    Console.WriteLine("Document Link: Document Target is available.")
End If
```

---

## Nearby

- **Previous:** [DocumentLink.DescriptiveText Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentlink/descriptivetext-property/llms-full.txt)
- **Next:** [DocumentLinkCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentlinkcollection/llms-full.txt)
