# ASP.NET DocumentEditor: Set Static Files Path

> In recent versions, the static files path had to be defined for all routes in where the editor is used. A new property has been introduced to define the static files path once for all routes.

- **Author:** Bjoern Meyer
- **Published:** 2021-12-28
- **Modified:** 2025-11-16
- **Description:** In recent versions, the static files path had to be defined for all routes in where the editor is used. A new property has been introduced to define the static files path once for all routes.
- **2 min read** (349 words)
- **Tags:**
  - ASP.NET
  - ASP.NET Core
  - Document Editor
  - Release
- **Web URL:** https://www.textcontrol.com/blog/2021/12/28/aspnet-document-editor-set-static-files-path/
- **LLMs URL:** https://www.textcontrol.com/blog/2021/12/28/aspnet-document-editor-set-static-files-path/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2021/12/28/aspnet-document-editor-set-static-files-path/llms-full.txt

---

In recent versions, the static files path had to be defined for all routes in where the editor is used. In version 30.0, a new property has been introduced to define the static files path once for all routes. Previously, each path, where the editor was used, had to be defined individually in the *Startup.cs* like this:

```
// serve static linked files (JavaScript and CSS for the editor)
app.UseStaticFiles(new StaticFileOptions {
  FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(
     System.IO.Path.Combine(System.IO.Path.GetDirectoryName(
        System.Reflection.Assembly.GetEntryAssembly().Location),
        "TXTextControl.Web")),
  RequestPath = "/envelope/create/TXTextControl.Web"
});

app.UseStaticFiles(new StaticFileOptions {
  FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(
     System.IO.Path.Combine(System.IO.Path.GetDirectoryName(
        System.Reflection.Assembly.GetEntryAssembly().Location),
        "TXTextControl.Web")),
  RequestPath = "/collaboration/edit/TXTextControl.Web"
});
```

In the above sample, the static files can be found from the following routes:

- .../envelope/create/
- .../collaboration/edit/

In version 30.0, by default, the static files are expected in the *TXTextControl.Web* folder location in the root of your web application.

For the above sample, only the following code is required in the *Startup.cs*:

```
app.UseStaticFiles(new StaticFileOptions
{
  FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(
     System.IO.Path.Combine(System.IO.Path.GetDirectoryName(
        System.Reflection.Assembly.GetEntryAssembly().Location),
        "TXTextControl.Web")),
  RequestPath = "/TXTextControl.Web"
});
```

If the editor is used in any path in the application in a view, the static files are now found automatically:

```
@Html.TXTextControl().TextControl(settings => {
   settings.Dock = TXTextControl.Web.DockStyle.Fill;
}).Render()
```

The virtual folder location and name of the static files can be changed in the *Startup.cs* (*TXTextControl.Web.MyName* in this case):

```
app.UseStaticFiles(new StaticFileOptions
{
  FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(
     System.IO.Path.Combine(System.IO.Path.GetDirectoryName(
        System.Reflection.Assembly.GetEntryAssembly().Location),
        "TXTextControl.Web")),
  RequestPath = "/TXTextControl.Web.MyName"
});
```

Then, this path can be defined in the view using the StaticFilesPath property:

```
@Html.TXTextControl().TextControl(settings => {
   settings.Dock = TXTextControl.Web.DockStyle.Fill;
   settings.StaticFilesPath = "/TXTextControl.Web.MyName";
}).Render()
```

Learn more about the other new features, improvements and changes of TX Text Control 30.0:

[What's New in Version 30.0?](https://www.textcontrol.com/product/tx-text-control-dotnet-server/whats-new/)

---

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

- [5 Layout Patterns for Integrating the TX Text Control Document Editor in ASP.NET Core C#](https://www.textcontrol.com/blog/2026/04/09/5-layout-patterns-for-integrating-the-tx-text-control-document-editor-in-aspnet-core-csharp/llms.txt)
- [Introducing Text Control Agent Skills](https://www.textcontrol.com/blog/2026/03/27/introducing-text-control-agent-skills/llms.txt)
- [Deploying the TX Text Control Document Editor from the Private NuGet Feed to Azure App Services (Linux and Windows)](https://www.textcontrol.com/blog/2026/03/25/deploying-the-tx-text-control-document-editor-from-the-private-nuget-feed-to-azure-app-services-linux-and-windows/llms.txt)
- [TX Text Control 34.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/02/18/tx-text-control-34-0-sp2-is-now-available/llms.txt)
- [Build a Custom Backstage View in ASP.NET Core with TX Text Control](https://www.textcontrol.com/blog/2026/02/17/build-a-custom-backstage-view-in-aspnet-core-with-tx-text-control/llms.txt)
- [ASP.NET Core Document Editor with Backend via the Text Control Private NuGet Feed](https://www.textcontrol.com/blog/2026/02/09/aspnet-core-document-editor-private-nuget-feed/llms.txt)
- [Why Document Processing Libraries Require a Document Editor](https://www.textcontrol.com/blog/2025/12/04/why-document-processing-libraries-require-a-document-editor/llms.txt)
- [TX Text Control 34.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/12/03/tx-text-control-34-0-sp1-is-now-available/llms.txt)
- [Introducing TX Text Control 34.0: Your Next Leap in Document Processing](https://www.textcontrol.com/blog/2025/11/10/introducing-tx-text-control-34-0-your-next-leap-in-document-processing/llms.txt)
- [PDF/UA vs. PDF/A-3a: Which Format Should You Use for Your Business Application?](https://www.textcontrol.com/blog/2025/10/24/pdf-ua-vs-pdf-a-3a-which-format-should-you-use-for-your-business-application/llms.txt)
- [Validating PDF/UA Documents in .NET C#](https://www.textcontrol.com/blog/2025/10/21/validating-pdf-ua-documents-in-dotnet-csharp/llms.txt)
- [Sneak Peek: TX Text Control 34.0 Coming November 2025](https://www.textcontrol.com/blog/2025/10/02/sneak-peek-tx-text-control-34-0-coming-november-2025/llms.txt)
- [TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/08/14/tx-text-control-33-0-sp3-is-now-available/llms.txt)
- [High-Performance Text Replacement in Large DOCX Files using C# .NET](https://www.textcontrol.com/blog/2025/07/30/high-performance-text-replacement-in-large-docx-files-using-csharp-dotnet/llms.txt)
- [Document Viewer 33.2.1 Released: New Event and Bug Fixes](https://www.textcontrol.com/blog/2025/07/30/document-viewer-33-2-1-released-new-event-and-bug-fixes/llms.txt)
- [Getting Started Video Tutorial: Document Editor in ASP.NET Core C# on Linux](https://www.textcontrol.com/blog/2025/07/29/getting-started-video-tutorial-document-editor-aspnet-core-csharp-linux/llms.txt)
- [Upcoming Support for PDF/UA Compliance and Tagged PDF Generation in Version 34.0](https://www.textcontrol.com/blog/2025/07/24/upcoming-support-for-pdf-ua-compliance-and-tagged-pdf-generation-in-version-34-0/llms.txt)
- [TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/06/18/tx-text-control-33-0-sp2-is-now-available/llms.txt)
- [Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5](https://www.textcontrol.com/blog/2025/05/07/service-pack-releases-whats-new-in-tx-text-control-33-0-sp1-and-32-0-sp5/llms.txt)
- [Introducing DS Server 4.0: Linux-Ready and Container-Friendly](https://www.textcontrol.com/blog/2025/04/30/introducing-ds-server-4-linux-ready-and-container-friendly/llms.txt)
- [Deploying the TX Text Control Document Editor in an ASP.NET Core Web App to Azure App Services](https://www.textcontrol.com/blog/2025/03/26/deploying-the-tx-text-control-document-editor-in-an-asp-net-core-web-app-to-azure-app-services/llms.txt)
- [Building an ASP.NET Core Backend (Linux and Windows) for the Document Editor and Viewer](https://www.textcontrol.com/blog/2025/03/26/building-an-asp-net-core-backend-for-the-document-editor-and-viewer/llms.txt)
- [TX Text Control for Blazor: Mail Merge Integration Tutorial](https://www.textcontrol.com/blog/2025/03/25/tx-text-control-for-blazor-mail-merge-integration-tutorial/llms.txt)
- [TX Text Control Document Editor and Viewer for Blazor Released](https://www.textcontrol.com/blog/2025/03/25/tx-text-control-document-editor-and-viewer-for-blazor-released/llms.txt)
- [Getting Started: Document Editor for Blazor in ASP.NET Core](https://www.textcontrol.com/blog/2025/03/25/getting-started-document-editor-for-blazor-in-asp-net-core/llms.txt)
