# SubTextPart.Data Property

> Gets or sets additional data of the subtextpart. An empty string indicates that the subtextpart has no data.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 26.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > SubTextPart.Data Property
- **455 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/subtextpart/data-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/subtextpart/data-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/subtextpart/data-property/llms-full.txt

---

### Description

Gets or sets additional data of the subtextpart. An empty string indicates that the subtextpart has no data.

### Syntax

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

```vbnet
Public Property Data As String
```

### Examples

The following example stores compact application metadata with a named customer region.

```csharp
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);

SubTextPart customer = new("CustomerName", 10)
{
    Data = @"{""category"":""customer"",""reviewed"":true}"
};

textControl.SubTextParts.Add(customer);
```

```vbnet
textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)

Dim customer As New SubTextPart("CustomerName", 10) With {
    .Data = "{""category"":""customer"",""reviewed"":true}"
}

textControl.SubTextParts.Add(customer)
```

---

## Nearby

- **Previous:** [SubTextPart Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/subtextpart/constructor/llms-full.txt)
- **Next:** [SubTextPart.GetChildren Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/subtextpart/getchildren-method/llms-full.txt)
