TXSheetControlAssetExtensions Class
- Namespace
TXTextControl.TXSheetControl. AspNetCore
- Package
TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. AspNetCore
- Assembly
TXTextControl.TXSheetControl. AspNetCore. dll
- Install
dotnet add package TXTextControl..NET 10 and later.TXSheetControl. AspNetCore
Restricts the product's static-file namespace to protected browser assets and public resource catalogs.
Syntax
public static class TXSheetControlAssetExtensions
Members
Methods
| Method | Description |
|---|---|
| UseTXSheetControlAssets | Rejects private/debugging paths before static-file or static-web-asset endpoint middleware executes. |
Examples
Configure a complete Razor Pages application. The editor tag helper includes its browser assets automatically; the optional font routes provide compatibility URLs for the bundled static catalog.
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using TXTextControl.TXSheetControl.AspNetCore;
var builder = WebApplication.CreateBuilder(Array.Empty<string>());
builder.Services.AddRazorPages();
var app = builder.Build();
app.UseTXSheetControlAssets();
app.MapRazorPages();
app.Run();