WebForms Core in NuGet

Published: (January 4, 2026 at 01:22 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

WebForms Core, the server‑driven UI technology developed by Elanat, is now officially available on NuGet under the package name WFC. The package lets .NET developers integrate WebForms Core into ASP.NET Core projects—including Razor Pages and MVC—using standard .NET tooling.

Installation

Install WebForms Core with a single command:

dotnet add package WFC

Or add a package reference directly in your .csproj file:

<!-- Add the package reference here -->

Adding the WebFormsJS Runtime

To complete the setup, the WebFormsJS runtime must be included in the “ section of your HTML pages. You can obtain WebFormsJS from:

  • Elanat:
  • GitHub:

Example: Removing a DOM Element with WebForms Core

HTML

    This element will be removed

Remove
@Html.Raw(ViewData["WebForms"] ?? "")

Server‑side (C# – WebForms Core)

using WebFormsCore;
...
public IActionResult OnGet()
{
    var form = new WebForms();

    if (Request.Query.ContainsKey("remove_box"))
    {
        form.Remove("box");
        return Content(form.Response(), "text/html");
    }

    // Bind click event
    form.SetGetEvent("removeBtn", "onclick", "?remove_box");

    // Export commands
    ViewData["WebForms"] = form.ExportToHtmlComment();

    return Page();
}

What happens here?

  • When the button is clicked, a request is sent to the server.
  • The server responds with a Remove command.
  • WebFormsJS executes the command instantly in the browser.
  • No page refresh, no DOM diffing, and no custom JavaScript are required.

Philosophy

WebForms Core follows a Deterministic UI Runtime + Protocol + DSL approach. It is:

  • Not just a framework.
  • Not merely server‑driven UI.
  • Not a revival of classic WebForms.

Instead, it defines:

  • A communication protocol.
  • A UI execution model.
  • A client‑side runtime.
  • A command‑oriented language.

No other web system currently combines all of these concerns into a single, cohesive model.

Further Reading

A practical Razor Pages example can be found in the article:
State Management in WebForms Core 2 (Razor Pages Example)

The availability of WebForms Core on NuGet marks an important step toward broader adoption in the .NET ecosystem. Whether you’re building new applications, modernizing legacy systems, or exploring server‑driven UI architectures beyond Blazor, WFC offers a powerful, minimalist, and fundamentally different approach worth exploring.

Back to Blog

Related posts

Read more »

Converting RTF to PDF in C#

Overview RTF Rich Text Format is a cross‑platform format widely used for document editing and data exchange. PDF, by contrast, is ideal for document distributi...

Stop Using IOptions Wrong in .NET!

IOptions vs IOptionsSnapshot vs IOptionsMonitor – Which One Should You Use? Ever got confused about which one to use in your .NET app? You're not alone! Let me...