Products Technologies Demo Docs Blog Support Company

This blog post contains outdated information.

The cited code snippets may be workarounds, and be part of the official API in the meantime.

Evaluating TX Text Control .NET Server using Trial Tokens

This article shows how to evaluate the TX Text Control document editor for ASP.NET using trial tokens in an ASP.NET 6 web application.

Evaluating TX Text Control .NET Server using Trial Tokens

In order to evaluate TX Text Control .NET Server, it is possible to download the trial version for a local installation of all requirements or to create a trial token to use our trial backend server. In case you are using the trial backend, no trial download or local installation is required to evaluate specific components of TX Text Control.

This tutorial shows how to use the trial token to evaluate the document editor of TX Text Control .NET Server in an ASP.NET Core web application.

Create a Trial Token

  1. In a first step, a trial token must be created on our website.

    Create Token

    After following the steps to create the token, you should see the following page that displays information about your trial token.

    Trial Token

Creating the Application

Make sure that you downloaded the latest version of Visual Studio 2022 that comes with the .NET 6 SDK.

  1. In Visual Studio 2022, create a new project by choosing Create a new project.

  2. Select ASP.NET Core Web App (Model-View-Controller) as the project template and confirm with Next.

  3. Choose a name for your project and confirm with Next.

  4. In the next dialog, choose .NET 6 (Long-term support) as the Framework and confirm with Create.

    Creating the .NET 6 project

Adding the NuGet Package

  1. In the Solution Explorer, select your created project and choose Manage NuGet Packages... from the Project main menu.

    Browse for txtextcontrol.web and Install the latest version of the TXTextControl.Web package.

    ASP.NET Core Web Application

Configure the Application

  1. Open the Program.cs file located in the project's root folder. Add the following code after the entry app.UseStaticFiles();:

    // serve static linked files (JavaScript and CSS for the editor)
    app.UseStaticFiles(new StaticFileOptions
    {
        FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(
           System.IO.Path.Combine(System.IO.Path.GetDirectoryName(
               System.Reflection.Assembly.GetEntryAssembly().Location),
               "TXTextControl.Web")),
        RequestPath = "/TXTextControl.Web"
    });
    
    // enable Web Sockets
    app.UseWebSockets();
    
    // attach the Text Control WebSocketHandler middleware
    app.UseMiddleware<TXTextControl.Web.WebSocketMiddleware>();

Adding the Control to the View

  1. Find the Index.cshtml file in the Views -> Home folder. Replace the complete content with the following code:

    @using TXTextControl.Web.MVC
    
    @Html.TXTextControl().TextControl(settings => {
        settings.WebSocketURL =
            "wss://backend.textcontrol.com?access-token=mWSLUHjhhgs567Rt6sKvS";
    }).Render()
  2. Replace the trial token (line 5: mWSLUHjhhgs567Rt6sKvS) with your generated trial token from step 1.

    This code adds the Text Control document editor to the view and uses the WebSocketURL property to connect to the trial backend.

  3. Compile and start the application to see the document editor in your web application.

    ASP.NET Core Web Application

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

ASP.NET

Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.

ASP.NET Core
Angular
Blazor
JavaScript
React
  • Angular
  • Blazor
  • React
  • JavaScript
  • ASP.NET MVC, ASP.NET Core, and WebForms

Learn more Trial token Download trial

Related Posts

ASP.NETASP.NET Core

Celebrating a Remarkable 2025: A Year of Innovation and Growth

2025 is coming to an end. Now is a great time to pause and reflect. What a year it has been for us! We are reflecting on the milestones and achievements of 2025 and highlighting the innovation and…


ASP.NETASP.NET CoreForms

Designing the Perfect PDF Form with TX Text Control in .NET C#

Learn how to create and design interactive PDF forms using TX Text Control in .NET C#. This guide covers essential features and best practices for effective form design.


ASP.NETASP.NET CoreMIME

Why Defining MIME Types for PDF/A Attachments Is Essential

The PDF/A standard was created to ensure the long-term reliable archiving of digital documents. An important aspect of the standard involves properly handling embedded files and attachments within…


ASP.NETASP.NET CoreConference

We are Returning to CodeMash 2026 as a Sponsor and Exhibitor

We are excited to announce that we will be returning to CodeMash 2026 as a sponsor and exhibitor. Join us to learn about the latest in .NET development and how our products can help you build…


ASP.NETASP.NET Core

AI-Ready Documents in .NET C#: How Structured Content Unlocks Better…

Most organizations use AI on documents that were never designed for machines. PDFs without tags, inconsistent templates, undescribed images, and disorganized reading orders are still common. This…

Summarize this blog post with:

Share on this blog post on: