# TextField.Name Property

> Relates a user-defined name to a text field. This can be any kind of text. This name can be used to uniquely identify a text field.

- **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 > TextField.Name Property
- **593 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfield/name-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfield/name-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfield/name-property/llms-full.txt

---

### Description

Relates a user-defined name to a text field. This can be any kind of text. This name can be used to uniquely identify a text field.

### Syntax

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

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

### Examples

The following example inserts a Word-compatible text field into a template by using `TextField.Name`.

```csharp
TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);

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

```vbnet
Dim textField As TextField = New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" })
textControl.TextFields.Add(textField)

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

### See Also

Text Fields and Hypertext Links - Identifiers and Names.

---

## Nearby

- **Previous:** [TextField.Length Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfield/length-property/llms-full.txt)
- **Next:** [TextField.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfield/scrollto-method/llms-full.txt)
