Products Technologies Demo Docs Blog Support Company

Creating an ASP.NET Web Forms AJAX Application

TX Text Control .NET Server for ASP.NET integrates into Web Forms by dragging the TextControl component from the Visual Studio Toolbox onto a designer form. Setting Dock to Window fills the area. The built-in File ribbon menu handles loading and saving documents from a configured folder.

Creating an ASP.NET Web Forms AJAX Application

Create Your Application

  1. Make sure that you installed at least a trial version of TX Text Control .NET Server on your development machine:

    Download Trial

  2. Open Visual Studio and create a new ASP.NET Empty Web Application.

    image

  3. In the Solution Explorer, select the project and choose Add New Item... from the Project main menu. In the opened dialog Add New Item, select Web Form and confirm with Add.

    image

  4. In the Solution Explorer, select the newly created Web Form and choose Designer from the View main menu.

    Find the TextControl component in the Toolbox and drag and drop an instance onto the Designer form.

    image

  5. Select TextControl1 on the form and browse for the Dock property in the Properties window and set this to Window.

  6. In the Solution Explorer, select the project and choose New Folder from the Project main menu. Type in a name for the folder (e.g. "documents").

  7. Select the newly created folder and choose Add Existing Item... from the Project main menu. In the opened dialog box, navigate to the following folder:

    %USERPROFILE%\Documents\TX Text Control 29.0.NET Server for ASP.NET\Samples\ASP.NET\CSharp\Documentation Tutorials\HTML5 Web Editor\Tutorial\documents

    Select all files and and confirm with Add.

  8. Repeat the above 2 steps with another folder for the images (e.g. "images"). Sample images can be found in the following directory:

    %USERPROFILE%\Documents\TX Text Control 29.0.NET Server for ASP.NET\Samples\ASP.NET\CSharp\Documentation Tutorials\HTML5 Web Editor\Tutorial\images

  9. Select the Web Form and switch to code view using the Code menu item from the View main menu. Add the following event handler code:

    protected void Page_Load(object sender, EventArgs e)
    {
      TextControl1.SetFileDirectoryAsync(Server.MapPath("documents"),
        TXTextControl.Web.FileType.Document);
    
      TextControl1.SetFileDirectoryAsync(Server.MapPath("images"),
        TXTextControl.Web.FileType.Image);
    }
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
      Handles Me.Load
      TextControl1.SetFileDirectoryAsync(Server.MapPath("documents"),
        TXTextControl.Web.FileType.Document)
    
      TextControl1.SetFileDirectoryAsync(Server.MapPath("images"),
        TXTextControl.Web.FileType.Image)
    End Sub
  10. Compile and start the application.

Using the integrated File ribbon menu, you can load and save documents from and to your specified documents folder.

image

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.NETDocumentViewerHTML5

Creating an ASP.NET MVC DocumentViewer Application With Razor

Create a simple ASP.NET (MVC) application that uses the HTML5 document viewer.


ASP.NETHTML5Razor

Creating an ASP.NET MVC Application With Razor

This tutorial covers integrating TX Text Control .NET Server for ASP.NET into an ASP.NET MVC application. It walks through installing the TXTextControl.Web NuGet package, creating an MVC 5…


ASP.NETReportingHTML5

Creating Your First ASP.NET Reporting Application

The MailMerge and ServerTextControl components of TX Text Control .NET Server for ASP.NET enable server-side reporting in Web Forms. A template.docx merges with XML data via a button click…


ASP.NETHTML5Web Forms

Updating Your TXTextControl.Web ASP.NET Web Forms Project from Version X12…

Upgrading an ASP.NET Web Forms project from TX Text Control X12 to X13 (23.0) requires removing the old TXTextControl.Web reference, adding the new TXTextControl.ASP.NET assembly, updating version…


ASP.NETGitHubHTML5

TextControl.Web: Creating an MVC Application with Razor

TextControl.Web is a Web Forms component with a code-behind API. This step-by-step tutorial integrates it into an ASP.NET MVC 4 application with Razor views by rendering the Web Form page via…

Share on this blog post on: