GitHub Examples
Complete projects that you clone, build and change are the next step after the online demos. Text Control publishes its sample applications on GitHub, in the organization TextControl: the official sample collections and the projects behind the articles of the Text Control Blog. Most samples are small ASP.NET Core or console applications that show one task, and a few are complete applications. Knowing how the samples reference TX Text Control saves time when you run one for the first time.
What the Organization Contains
- The official sample collections. TXSamples.NET is the index of the .NET samples that Text Control also installs with the setup. For TX Text Control .NET Server, it links TXSamples_ASP.NET_CSharp, which contains a Document Editor, a Mail Merge and a Document Viewer application.
- Blog samples. Articles of the Text Control Blog that come with a sample end with a box titled "Download and Fork This Sample on GitHub", which links the repository and names the requirements, such as the TX Text Control version and Visual Studio. The names of newer repositories start with
TXTextControl., those of older ones often withTextControl.. - Complete applications. Some repositories are applications rather than samples, such as the e-signature platform SignFabric.
- Other products. The organization also contains samples for TX Text Control .NET for Windows Forms and WPF, TX Spell .NET, DS Server and ReportingCloud. The examples pages of this section list only samples for TX Text Control .NET Server.
Samples Installed With the Setup
The Windows setup of TX Text Control .NET Server installs a set of basic tutorial applications on the development machine. Their default location is %USERPROFILE%\Documents\TX Text Control 34.0.NET Server for ASP.NET\Samples\ASP.NET, with one folder per platform below CSharp:
| Platform | Folder |
|---|---|
| ASP.NET Core | CSharp\ASP.NET Core |
| ASP.NET MVC on the .NET Framework | CSharp\ASP.NET MVC |
| ASP.NET Web Forms on the .NET Framework | CSharp\ASP.NET Web Forms |
To find them, open the folder in File Explorer, or start the Help Center from the Windows Start menu under TX Text Control 34.0.NET Server for ASP.NET, go to Getting Started > Sample Projects and choose TX Text Control .NET Server for ASP.NET. Open a sample's project in Visual Studio to build and run it. The repository TXSamples_ASP.NET_CSharp has the same three folders: a Document Editor, a Document Viewer and a mail merge application for ASP.NET Core and for ASP.NET MVC, and a Document Editor for Web Forms. The samples for the .NET Framework are legacy applications; see .NET Framework in the Integration Guide.
Run a Sample
Most samples reference the TX Text Control NuGet packages by name and version and contain no nuget.config: where the packages come from depends on your own setup. In most repositories the .csproj file is in a folder below the repository root, and that folder is where you restore, build and run. The following commands run the sample of five layouts for the Document Editor:
git clone https://github.com/TextControl/TXTextControl.DocumentEditor.Views.git
cd TXTextControl.DocumentEditor.Views/tx-render-editor
dotnet restore
dotnet run
Before dotnet restore, make the packages available:
- Check the project file. The .csproj file names the target framework, such as
net10.0, and the version of each TX Text Control package. Install the .NET SDK it needs. - Provide a package source. Licensed developers copy their nuget.config for the Text Control Private NuGet Feed next to the project or solution, as nuget.config describes. Don't commit it to your fork, because it contains your API token. Evaluators install the trial version, whose setup provides the packages as a local source, as Offline Packages describes.
- Restore, build and run. In Visual Studio, open the solution and start it; with the .NET CLI, use the commands above.
Update an Older Sample
A sample references the package versions that were current when it was written. Even recent samples refer to earlier service packs than the current release, and older ones to version 33.0 or earlier. Update the packages to the newest versions available to you, as Updating NuGet Packages describes; dotnet list package --outdated lists the packages with newer versions.
Samples of earlier versions need more than new package versions:
- Version 33.0. Samples of version 33.0 start the Document Editor backend with their own code or don't include it; since version 34.0, the
TXTextControl.Web.DocumentEditor.Backendpackage does it. From the Old Document Editor Backend to the Backend Package and From 33.0 to 34.0 with NuGet Packages describe the changes. - The .NET Framework. Samples for ASP.NET MVC or Web Forms on the .NET Framework use the Classic engine and a different setup: ASP.NET on .NET Framework describes it, and From ASP.NET MVC on the .NET Framework to ASP.NET Core describes the move to ASP.NET Core.
- Breaking changes. Breaking Changes lists the changes between the major versions that affect code.
Where to Start
These repositories combine several components or introduce the product as a whole:
| Example | What it shows | Where |
|---|---|---|
| Document Editor layouts | Five ways to place the Document Editor in an ASP.NET Core MVC application: full screen, modal dialog, sidebar, split panel and tabs, as described in 5 Layout Patterns for Integrating the TX Text Control Document Editor in ASP.NET Core C#. .NET 10, version 34.0 | TXTextControl.DocumentEditor.Views |
| Document repository | A file-based document repository with version control and, in the demo, the Document Editor, as described in File Based Document Repository with Version Control in .NET with TX Text Control. Version 34.0 | TXTextControl.DocumentRepository, TXTextControl.DocumentRepository.Demo |
| SignFabric | A complete e-signature application: documents are prepared in the Document Editor, signed in the Document Viewer and sealed as PDF on the server. .NET 10, version 34.0 | SignFabric |
| Mail merge and form fields | Templates designed in the Document Editor, form fields filled in the Document Viewer and documents merged with MailMerge in one ASP.NET Core application. Version 33.0 | TXTextControl.Server.Core.BestPractice |
| Official ASP.NET samples | The Document Editor, mail merge and Document Viewer applications of the setup for ASP.NET Core and for ASP.NET MVC on the .NET Framework, and a Document Editor for ASP.NET Web Forms, as described in Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub. Version 33.0 | TXSamples_ASP.NET_CSharp |
The blog article Getting Started with SignFabric: From Clone to Your First Signature Envelope walks through cloning a repository, opening its solution in Visual Studio, restoring the packages and running the application.
Samples by Topic
The other pages of this section list the repositories and online demos of one topic each:
Next Steps
- Online Demos: try the features in the browser before you clone a sample.
- Getting Started: build a first application step by step.
- Updating NuGet Packages: bring a sample to the current version.