Home
Migrate your ASP.NET Web Forms application to Blazor — without a complete rewrite.
BlazorWebFormsComponents gives you 52 Blazor components that match the names, properties, and HTML output of the original ASP.NET Web Forms controls. Drop the asp: prefix, add a @using, and your existing markup just works. Your CSS stays intact, your layout doesn't break, and your team can migrate page by page instead of all at once.
Built for .NET 10 — supports Static SSR and ServerInteractive rendering modes.
Quick Start¶
Install the NuGet package:
Register services in Program.cs:
Then use components with the same names and attributes you already know:
<!-- Before (Web Forms) -->
<asp:Label ID="lblGreeting" runat="server" Text="Hello, World!" CssClass="header" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
<!-- After (Blazor) -->
<Label @ref="lblGreeting" Text="Hello, World!" CssClass="header" />
<Button @ref="btnSubmit" Text="Submit" OnClick="btnSubmit_Click" />
For full setup details including JavaScript interop and ViewState configuration, see Service Registration.
Component Coverage — 96% Complete¶
52 of 54 Web Forms controls are implemented across six categories. Only Substitution and Xml are deferred — they have no meaningful Blazor equivalent.
| Category | Components | Status |
|---|---|---|
| Editor Controls | 25 / 27 | Label, TextBox, Button, DropDownList, Calendar, FileUpload, and more |
| Data Controls | 9 / 9 | GridView, ListView, Repeater, DataGrid, Chart, DetailsView |
| Validation Controls | 8 / 8 | RequiredFieldValidator, CompareValidator, RangeValidator, and more |
| Navigation Controls | 3 / 3 | Menu, TreeView, SiteMapPath |
| Login Controls | 7 / 7 | Login, CreateUserWizard, ChangePassword, and more |
| Ajax Toolkit Extenders | 25+ | Accordion, ModalPopup, CalendarExtender, TabContainer, and more |
Migration Tooling¶
BlazorWebFormsComponents isn't just a component library — it includes automated tooling to accelerate your migration.
- PowerShell migration scripts — Run
bwfc-migrate.ps1to convert.aspx/.ascx/.masterfiles into.razorcomponents automatically. See the Automated Migration Guide. - Roslyn analyzers (BWFC001–BWFC020+) — Catch migration issues at build time with diagnostics tailored to Web Forms patterns. See Analyzers.
- Custom Controls shim layer — Migrating custom server controls?
WebControl,CompositeControl,HtmlTextWriter, andDataBoundWebControlbase classes let you bring your custom controls forward. See Custom Controls.
Utility Features¶
Web Forms wasn't just controls — it was a runtime with conventions your code depends on. BlazorWebFormsComponents provides shims for the patterns that matter most:
- ViewState & IsPostBack — Familiar state management that adapts to Blazor's rendering modes
- DataBinder.Eval — Keep your data-binding expressions working
- Response.Redirect — Navigation that feels like Web Forms
- NamingContainer & ID Rendering — Predictable element IDs for JavaScript and CSS
- WebFormsPageBase — A page base class with the lifecycle hooks you expect
Migration Guides¶
Planning your migration? Start here:
- Getting Started — Overview and first steps
- Migration Strategies — Incremental, page-by-page, and hybrid approaches
- Master Pages → Layouts — Convert your site structure
- User Controls → Components — Reuse your existing UI building blocks
- Known Fidelity Divergences — Where Blazor output differs from Web Forms (and why)
A migration bridge, not a greenfield framework
BlazorWebFormsComponents is designed for existing applications moving from Web Forms to Blazor. Some rendered HTML intentionally matches legacy Web Forms output rather than modern best practices — that's the point. Once migrated, you can incrementally modernize your markup at your own pace.
Get Involved¶
BlazorWebFormsComponents is open source and maintained by Jeff Fritz and the community. Contributions, bug reports, and feedback are welcome.