# TextControlSettings.Width Property

> Gets or sets the width of the control in the browser in percent, pixels or any other valid CSS length unit.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.Web.MVC`
- **Package:** `TXTextControl.Web` (assembly `TXTextControl.Web.DocumentEditor.dll`, from nuget.org, the private NuGet feed or Text Control Offline Packages)
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.Web.MVC > TextControlSettings.Width Property
- **412 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrolsettings/width-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrolsettings/width-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrolsettings/width-property/llms-full.txt

---

### Description

Gets or sets the width of the control in the browser in percent, pixels or any other valid CSS length unit.

### Syntax

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

```vbnet
Public Property Width As String
```

### Examples

In the current ASP.NET Core integration, `Width` is configured through `TextControlSettings`. The following example sets it while creating the editor configuration.

```csharp
textControlSettings.Width = "Quarterly report";
if (!string.IsNullOrWhiteSpace(textControlSettings.Width))
{
    Console.WriteLine($"Width: {textControlSettings.Width}");
}
```

```vbnet
textControlSettings.Width = "Quarterly report"
If Not String.IsNullOrWhiteSpace(textControlSettings.Width) Then
    Console.WriteLine($"Width: {textControlSettings.Width}")
End If
```

---

## Nearby

- **Previous:** [TextControlSettings.UserNames Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrolsettings/usernames-property/llms-full.txt)
- **Next:** [BinaryStreamType Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/binarystreamtype/enumeration/llms-full.txt)
