TX Text Control .NET Server

SaveUserInput Method

Method|Introduced in 15.0
Namespace
TXTextControl.DocumentServer.Web
Package
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.Web.DocumentViewer.dll from the private NuGet feed or Text Control Offline Packages

Description

Initiates saving the currently loaded form's user input. The actual saving is performed by a method which has to be bound to the DocumentServer.Web.DocumentViewer.SaveFormData event.

Syntax

public void SaveUserInput();

Examples

DocumentServer.Web.DocumentViewer.SaveUserInput belongs to the legacy Web Forms viewer. In the current ASP.NET Core viewer, configure the server-rendered component through DocumentViewerSettings.DocumentPath; interactive page state and styling are handled by the viewer client.

documentViewerSettings.DocumentPath = @"App_Data\document.docx";
if (!string.IsNullOrWhiteSpace(documentViewerSettings.DocumentPath))
{
    Console.WriteLine($"Document Path: {documentViewerSettings.DocumentPath}");
}