TX Text Control .NET Server

TXTextControl Method

Method|Introduced in 23.0
Namespace
TXTextControl.Web.MVC
Package
TXTextControl.Web as TXTextControl.Web.DocumentEditor.dll from nuget.org, the private NuGet feed or Text Control Offline Packages

Description

Provides access to helper methods allowing you to render individual TX Text Control ASP.NET MVC extensions. For now only one extension is implemented (see class TextControl).

Syntax

TXTextControl(HtmlHelper)

Provides access to helper methods allowing you to render individual TX Text Control ASP.NET MVC extensions. For now only one extension is implemented (see class TextControl).

Only for .NET Framework 4.5.

public static ControlsFactory TXTextControl(this HtmlHelper helper);
ParameterDescription
helper

A System.Web.Mvc.HtmlHelper object representing the HTML helper instance that this method extends.

TXTextControl(IHtmlHelper)

Only for .NET 8.

public static ControlsFactory TXTextControl(this IHtmlHelper helper);

Return Value

Returns a ControlsFactory object containing helper methods to render TX Text Control extensions.

Examples

The following example obtains the TX Text Control helper factory from the current Razor IHtmlHelper before configuring an editor or Document Viewer.

TXTextControl.Web.MVC.ControlsFactory controls = TXTextControl.Web.MVC.HtmlHelperExtension.TXTextControl(htmlHelper);
Console.WriteLine($"TX helper factory: {controls.GetType().Name}");