TXTextControl Method
- Namespace
TXTextControl.Web. MVC
- Package
TXTextControl.asWeb TXTextControl.from nuget.org, the private NuGet feed or Text Control Offline PackagesWeb. DocumentEditor. dll
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);<Extension>
Public Function TXTextControl(helper As HtmlHelper) As ControlsFactory| Parameter | Description |
|---|---|
| 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);<Extension>
Public Function TXTextControl(helper As IHtmlHelper) As ControlsFactoryReturn 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}");Dim controls As TXTextControl.Web.MVC.ControlsFactory = TXTextControl.Web.MVC.HtmlHelperExtension.TXTextControl(htmlHelper)
Console.WriteLine($"TX helper factory: {controls.GetType().Name}")