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

- **Author:** Bjoern Meyer
- **Published:** 2020-01-01
- **Modified:** 2026-03-05
- **Description:** 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.
- **3 min read** (428 words)
- **Tags:**
  - Ajax
  - ASP.NET
  - HTML5
  - Tutorial
  - Web Forms
- **Web URL:** https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-web-forms-ajax-application/
- **LLMs URL:** https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-web-forms-ajax-application/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-web-forms-ajax-application/llms-full.txt

---

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 ](https://www.textcontrol.com/product/tx-text-control-dotnet-server/download/ "Download trial version")
2. Open Visual Studio and create a new *ASP.NET Empty Web Application*.
    
    ![image](https://s1-www.textcontrol.com/assets/dist/blog/2020/01/01/f/assets/tutorial_html5_1.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2020/01/01/f/assets/tutorial_html5_2.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2020/01/01/f/assets/tutorial_html5_3.webp "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](https://s1-www.textcontrol.com/assets/dist/blog/2020/01/01/f/assets/tutorial_html5_5.webp "image")

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Creating an ASP.NET MVC DocumentViewer Application With Razor](https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-mvc-documentviewer-application-with-razor/llms.txt)
- [Creating an ASP.NET MVC Application With Razor](https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-mvc-application-with-razor/llms.txt)
- [Creating Your First ASP.NET Reporting Application](https://www.textcontrol.com/blog/2020/01/01/creating-your-first-aspnet-reporting-application/llms.txt)
- [Updating Your TXTextControl.Web ASP.NET Web Forms Project from Version X12 to X13 (23.0)](https://www.textcontrol.com/blog/2016/01/07/updating-your-txtextcontrolweb-aspnet-web-forms-project-from-version-x12-to-x13-230/llms.txt)
- [TextControl.Web: Creating an MVC Application with Razor](https://www.textcontrol.com/blog/2015/05/12/textcontrolweb-creating-an-mvc-application-with-razor/llms.txt)
