The controller HttpPost method accepts the JSON string in form of a model in the parameter. The document is converted to a byte array and loaded into a temporary ServerTextControl instance. Finally, the document is saved server-side using the Save method of the ServerTextControl object.
The model DocumentViewModel is shown in the code below:
Download the sample from GitHub and test it on your own.
Download and Fork This Sample on GitHub
We proudly host our sample code on GitHub.com/TextControl.
Please fork and contribute.
Requirements for This Sample
- Visual Studio 2012 or better
- TX Text Control .NET Server for ASP.NET (trial sufficient)