# SubTextPart.Text Property

> Gets the subtextpart's text.

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

---

### Description

Gets the subtextpart's text.

### Syntax

```csharp
public string Text { get; }
```

```vbnet
Public ReadOnly Property Text As String
```

### Examples

The following example marks the selected customer name as a named document region by using `SubTextPart.Text`.

```csharp
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPart subTextPart = new("CustomerName", 10);
textControl.SubTextParts.Add(subTextPart);

Console.WriteLine($"Text: {subTextPart.Text}");
Console.WriteLine("Sub Text Part is ready for use.");
```

```vbnet
textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim subTextPart As New SubTextPart("CustomerName", 10)
textControl.SubTextParts.Add(subTextPart)

Console.WriteLine($"Text: {subTextPart.Text}")
Console.WriteLine("Sub Text Part is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [SubTextPart.Start Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpart/start-property/llms-full.txt)
- **Next:** [SubTextPartCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpartcollection/llms-full.txt)
