# TextControl Class

> The TextControl class represents an extension object implementing the Text Control rich text editor functionality. To create an instance of this class and render an editor in an ASP.NET MVC application the ControlsFactory class is used. (See also ControlsFactory.TextControl method)

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **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)
- **Inherits:** `TXTextControl.Web.MVC.ControlBase`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.Web.MVC > TextControl Class
- **887 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/llms-full.txt

---

### Description

The TextControl class represents an extension object implementing the Text Control rich text editor functionality. To create an instance of this class and render an editor in an ASP.NET MVC application the [ControlsFactory](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/controlsfactory/llms-full.txt) class is used. (See also [ControlsFactory.TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/controlsfactory/textcontrol-method/llms-full.txt) method)

### Syntax

```csharp
public class TextControl : ControlBase
```

```vbnet
Public Class TextControl
    Inherits ControlBase
```

### Examples

The following example creates a Text Control object and prepares it for a document workflow.

```csharp
TXTextControl.Web.MVC.TextControl textControl = new();
Console.WriteLine("Text Control is ready for the document workflow.");
```

```vbnet
Dim textControl As New TXTextControl.Web.MVC.TextControl()
Console.WriteLine("Text Control is ready for the document workflow.")
```

---

## In This Section

- [TextControl Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/constructor/llms-full.txt): Initializes a new instance of the TextControl class.
- [TextControl.LoadDataFromJson Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/loaddatafromjson-method/llms-full.txt): Uses data given as a JSON string as a data source. The JSON string has to contain an array of equally structured objects. Analyzes and uses the given objects as merge data in the same way as the method LoadDataFromModel.
- [TextControl.LoadDataFromModel Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/loaddatafrommodel-method/llms-full.txt): Loads a collection implementing interface System.Collections.IEnumerable as a data source.
- [TextControl.LoadDataSet Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/loaddataset-method/llms-full.txt): Loads a database which is used to create table and field name menu items in the mailings ribbon tab from an existing DataSet object.
- [TextControl.LoadText Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/loadtext-method/llms-full.txt): Loads text in a certain format. The complete contents of a TextControl are replaced.
- [TextControl.LoadXMLDatabase Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/loadxmldatabase-method/llms-full.txt): Loads an XML database which is used to create table and field name menu items in the mailings ribbon tab.
- [TextControl.SetFileDirectory Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/setfiledirectory-method/llms-full.txt): Determines the directory path where the files of a specific file type are stored.

---

## Nearby

- **Previous:** [HtmlHelperExtension.TXTextControl Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/htmlhelperextension/txtextcontrol-method/llms-full.txt)
- **Next:** [TextControl Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc/textcontrol/constructor/llms-full.txt)
