Install any skill in seconds. Free to start, no credit card required.
Get Started Free →fritzandfriends/bwfc-custom-control-migration
Migrate custom ASP.NET Web Forms server controls (WebControl, CompositeControl) to Blazor using BlazorWebFormsComponents. Covers RenderContents/HtmlTextWriter preservation, TagKey mapping, AddAttributesToRender, CreateChildControls, and the one-line-change migration pattern. WHEN: 'migrate custom control', 'webcontrol to blazor', 'rendercontents migration', 'htmltextwriter blazor', 'custom server control'. FOR SINGLE OPERATIONS: use /bwfc-ascx-migration for .ascx user controls, /bwfc-migration f
Passed 21 of 22 test cases with the skill, and 13 of 22 without it.
and 6 more in the full report
8 fixed13 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
A legacy server control stores its `MaxItems` configuration in `ViewState["MaxItems"]`. How should this property definition be written when refactoring to run as a Blazor component using Web Forms control shims? Provide the property code snippet.
| Checked | Without skill | With skill |
|---|---|---|
| Decorates the public MaxItems property with [Parameter] | Passed | Passed |
| Uses a private backing field or auto-property instead of ViewState | Missed | Passed |
The instructions your model reads when the skill loads.
ASP.NET Web Forms custom server controls inherit from System.Web.UI.WebControls.WebControl and render HTML imperatively via HtmlTextWriter. BlazorWebFormsComponents provides a drop-in replacement that lets this code work unchanged in Blazor.
The key principle: change one using statement, keep your code.
// Before (Web Forms)
using System.Web.UI.WebControls;
// After (Blazor + BWFC)
using BlazorWebFormsComponents.CustomControls;
The BWFC WebControl class overrides Blazor's BuildRenderTree:
HtmlTextWriter instance (backed by StringBuilder)AddAttributesToRender(writer) — emits ID, class, style, tooltip, disabledRender(writer) → RenderBeginTag → RenderContents → RenderEndTagwriter.GetHtml()builder.AddMarkupContent(0, html)Your imperative rendering code produces the exact same HTML it did in Web Forms.
The classic Web Forms pattern — override TagKey for the outer element, RenderContents for the inner HTML:
using BlazorWebFormsComponents.CustomControls;
using Microsoft.AspNetCore.Components;
public class StatusBadge : WebControl
{
test cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.