[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-dotnet-collect-user-input":3,"mdc--5sr4ga-key":37,"related-org-dotnet-collect-user-input":3282,"related-repo-dotnet-collect-user-input":3444},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":32,"sourceUrl":35,"mdContent":36},"collect-user-input","build forms and handle user input","Build forms, validate data, and react to user input in Blazor. USE FOR adding forms, search boxes, filter panels, inline editing, data-entry UI, file uploads, validation (annotations or custom), handling form submissions, and binding input controls. Covers EditForm, built-in input components, DataAnnotationsValidator, custom validation, SSR form patterns (SupplyParameterFromForm, FormName, AntiforgeryToken, Enhance), and @bind for simple interactive controls. DO NOT USE for project scaffolding (see create-blazor-project) or prerendering issues (see support-prerendering).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"dotnet",".NET (Microsoft)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdotnet.png",[12,16,19,22],{"name":13,"slug":14,"type":15},".NET","net","tag",{"name":17,"slug":18,"type":15},"Blazor","blazor",{"name":20,"slug":21,"type":15},"UI Components","ui-components",{"name":23,"slug":24,"type":15},"Frontend","frontend",4576,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills","2026-07-12T08:23:02.914957","MIT",332,[31],"agent-skills",{"repoUrl":26,"stars":25,"forks":29,"topics":33,"description":34},[31],"Repository for skills to assist AI coding agents with .NET and C#","https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fdotnet-blazor\u002Fskills\u002Fcollect-user-input","---\nlicense: MIT\nname: collect-user-input\ndescription: Build forms, validate data, and react to user input in Blazor. USE FOR adding forms, search boxes, filter panels, inline editing, data-entry UI, file uploads, validation (annotations or custom), handling form submissions, and binding input controls. Covers EditForm, built-in input components, DataAnnotationsValidator, custom validation, SSR form patterns (SupplyParameterFromForm, FormName, AntiforgeryToken, Enhance), and @bind for simple interactive controls. DO NOT USE for project scaffolding (see create-blazor-project) or prerendering issues (see support-prerendering).\n---\n\n# Collect User Input\n\n## Step 1 — Read the Project's AGENTS.md\n\nCheck `AGENTS.md` for **Interactivity Mode** and **Interactivity Scope**. This determines which form patterns apply:\n\n| Mode | Form mechanism |\n|------|---------------|\n| None (Static SSR) | `EditForm` with `FormName` + `[SupplyParameterFromForm]`. No `@bind`, no `@onchange`. |\n| Server | `EditForm` with `@bind-Value`. Full interactivity — real-time validation, dynamic UI. |\n| WebAssembly | Same as Server, but validators needing server data must call APIs. |\n| Auto | Same as WebAssembly — code must work in both browser and server. |\n\n| Scope | Impact |\n|-------|--------|\n| Global | All forms are interactive. `FormName` only needed when explicitly opting a page to static SSR. |\n| Per-page | Forms in static pages use `FormName` + `[SupplyParameterFromForm]`. Forms in `@rendermode` pages use `@bind-Value`. |\n\n## EditForm Setup\n\n`EditForm` requires **either** `Model` or `EditContext` — never both.\n\n### Model-based (default)\n\n```razor\n\u003CEditForm Model=\"Employee\" OnValidSubmit=\"HandleSubmit\" FormName=\"employee\">\n    \u003CDataAnnotationsValidator \u002F>\n    \u003CValidationSummary \u002F>\n\n    \u003Clabel>\n        Name: \u003CInputText @bind-Value=\"Employee!.Name\" \u002F>\n        \u003CValidationMessage For=\"() => Employee!.Name\" \u002F>\n    \u003C\u002Flabel>\n\n    \u003Cbutton type=\"submit\">Save\u003C\u002Fbutton>\n\u003C\u002FEditForm>\n\n@code {\n    [SupplyParameterFromForm]\n    private EmployeeModel? Employee { get; set; }\n\n    protected override void OnInitialized() => Employee ??= new();\n\n    private async Task HandleSubmit()\n    {\n        \u002F\u002F Save Employee\n    }\n}\n```\n\nThis single pattern works in **both** SSR and interactive modes:\n- In SSR: `FormName` identifies the form, `[SupplyParameterFromForm]` binds POST data, `??=` initializes on GET.\n- In interactive: `@bind-Value` provides two-way binding, `[SupplyParameterFromForm]` is ignored, `FormName` is harmless.\n\n### EditContext-based (advanced)\n\nUse when you need programmatic field tracking, dynamic validation rules, or manual `EditContext.Validate()` calls:\n\n```csharp\nprivate EditContext? editContext;\nprivate EmployeeModel model = new();\n\nprotected override void OnInitialized()\n{\n    editContext = new EditContext(model);\n}\n```\n\n```razor\n\u003CEditForm EditContext=\"editContext\" OnValidSubmit=\"HandleSubmit\" FormName=\"employee\">\n```\n\n## Submit Handlers\n\n| Handler | Fires when | Use when |\n|---------|-----------|----------|\n| `OnValidSubmit` | Validation passes | Standard forms with `DataAnnotationsValidator` |\n| `OnInvalidSubmit` | Validation fails | Need custom handling for invalid state |\n| `OnSubmit` | Always — validation is manual | Using `EditContext.Validate()` yourself |\n\n`OnSubmit` cannot combine with `OnValidSubmit`\u002F`OnInvalidSubmit`.\n\n## Built-in Input Components\n\n| Component | Binds to | Notes |\n|-----------|----------|-------|\n| `InputText` | `string` | Renders `\u003Cinput type=\"text\">` |\n| `InputTextArea` | `string` | Renders `\u003Ctextarea>` |\n| `InputNumber\u003CT>` | `int`, `double`, `decimal` | Renders `\u003Cinput type=\"number\">` |\n| `InputDate\u003CT>` | `DateTime`, `DateOnly`, `DateTimeOffset` | Renders `\u003Cinput type=\"date\">` |\n| `InputCheckbox` | `bool` | Renders `\u003Cinput type=\"checkbox\">` |\n| `InputSelect\u003CT>` | `string`, enums, numeric types | Renders `\u003Cselect>` |\n| `InputRadioGroup\u003CT>` | `string`, enums, numeric types | Wraps `InputRadio\u003CT>` children |\n| `InputFile` | `IBrowserFile` | File upload — interactive modes only |\n\nAll input components use `@bind-Value` for binding. Always wrap text in a `\u003Clabel>` or use `id`\u002F`for` attributes for accessibility.\n\n### InputSelect with enum values\n\n```razor\n\u003CInputSelect @bind-Value=\"Model!.Status\">\n    \u003Coption value=\"\">-- Select --\u003C\u002Foption>\n    @foreach (var value in Enum.GetValues\u003COrderStatus>())\n    {\n        \u003Coption value=\"@value\">@value\u003C\u002Foption>\n    }\n\u003C\u002FInputSelect>\n```\n\n### InputRadioGroup\n\n```razor\n\u003CInputRadioGroup @bind-Value=\"Model!.Priority\">\n    @foreach (var p in Enum.GetValues\u003CPriority>())\n    {\n        \u003Clabel>\n            \u003CInputRadio Value=\"p\" \u002F> @p\n        \u003C\u002Flabel>\n    }\n\u003C\u002FInputRadioGroup>\n```\n\n## Validation\n\n### Data annotations\n\nDefine validation rules on the model:\n\n```csharp\npublic class EmployeeModel\n{\n    [Required, StringLength(100)]\n    public string? Name { get; set; }\n\n    [Required, EmailAddress]\n    public string? Email { get; set; }\n\n    [Range(18, 99)]\n    public int Age { get; set; }\n\n    [Required]\n    public string? Department { get; set; }\n}\n```\n\nAdd `\u003CDataAnnotationsValidator \u002F>` inside `EditForm` — without it, annotation attributes are silently ignored.\n\nDisplay errors with:\n- `\u003CValidationSummary \u002F>` — all errors in a list\n- `\u003CValidationMessage For=\"() => Model!.FieldName\" \u002F>` — per-field inline errors\n\n### Custom validator component\n\nFor server-round-trip validation (uniqueness checks, business rules):\n\n```csharp\npublic class CustomValidator : ComponentBase\n{\n    [CascadingParameter]\n    private EditContext? EditContext { get; set; }\n\n    private ValidationMessageStore? messageStore;\n\n    protected override void OnInitialized()\n    {\n        messageStore = new ValidationMessageStore(EditContext!);\n        EditContext!.OnValidationRequested += (s, e) => messageStore.Clear();\n        EditContext!.OnFieldChanged += (s, e) => messageStore.Clear(e.FieldIdentifier);\n    }\n\n    public void DisplayErrors(Dictionary\u003Cstring, List\u003Cstring>> errors)\n    {\n        foreach (var (field, messages) in errors)\n        {\n            foreach (var message in messages)\n            {\n                messageStore!.Add(EditContext!.Field(field), message);\n            }\n        }\n        EditContext!.NotifyValidationStateChanged();\n    }\n\n    public void ClearErrors()\n    {\n        messageStore?.Clear();\n        EditContext?.NotifyValidationStateChanged();\n    }\n}\n```\n\nUsage in a form:\n\n```razor\n\u003CEditForm Model=\"Model\" OnValidSubmit=\"HandleSubmit\" FormName=\"register\">\n    \u003CDataAnnotationsValidator \u002F>\n    \u003CCustomValidator @ref=\"customValidator\" \u002F>\n    \u003CValidationSummary \u002F>\n    @* inputs *@\n\u003C\u002FEditForm>\n\n@code {\n    private CustomValidator? customValidator;\n\n    private async Task HandleSubmit()\n    {\n        var errors = await RegistrationService.ValidateAsync(Model!);\n        if (errors.Count > 0)\n        {\n            customValidator!.DisplayErrors(errors);\n            return;\n        }\n        \u002F\u002F proceed\n    }\n}\n```\n\n## React to Input Changes (Interactive Only)\n\n### @bind:after\n\nRun logic after a bound value changes:\n\n```razor\n\u003CInputText @bind-Value=\"Model!.ZipCode\" @bind:after=\"OnZipCodeChanged\" \u002F>\n\n@code {\n    private async Task OnZipCodeChanged()\n    {\n        \u002F\u002F Fetch city\u002Fstate based on new zip code\n        var location = await LocationService.LookupAsync(Model!.ZipCode);\n        Model.City = location?.City;\n        Model.State = location?.State;\n    }\n}\n```\n\n### @oninput for real-time filtering\n\n```razor\n\u003Cinput type=\"text\" @oninput=\"OnSearchInput\" placeholder=\"Search...\" \u002F>\n\n@code {\n    private string searchTerm = \"\";\n    private List\u003CItem> filteredItems = new();\n\n    private void OnSearchInput(ChangeEventArgs e)\n    {\n        searchTerm = e.Value?.ToString() ?? \"\";\n        filteredItems = allItems.Where(i =>\n            i.Name.Contains(searchTerm, StringComparison.OrdinalIgnoreCase)).ToList();\n    }\n}\n```\n\n## SSR-Specific Patterns\n\nThese apply when the form renders in Static SSR (mode = None, or per-page without `@rendermode`).\n\n### SupplyParameterFromForm\n\nBinds POST data to a property on form submission:\n\n```csharp\n[SupplyParameterFromForm]\nprivate ContactModel? Contact { get; set; }\n\nprotected override void OnInitialized() => Contact ??= new();\n```\n\n**Critical:** The `??=` in `OnInitialized` is required. On GET the property is null — `??=` creates the model. On POST the framework populates it — `??=` preserves the posted values.\n\n### FormName — multiple forms on one page\n\nEach form needs a unique `FormName`:\n\n```razor\n\u003CEditForm Model=\"Search\" OnSubmit=\"DoSearch\" FormName=\"search\">...\u003C\u002FEditForm>\n\u003CEditForm Model=\"Contact\" OnValidSubmit=\"SaveContact\" FormName=\"contact\">...\u003C\u002FEditForm>\n```\n\nMatch `[SupplyParameterFromForm]` to its form:\n\n```csharp\n[SupplyParameterFromForm(FormName = \"search\")]\nprivate SearchModel? Search { get; set; }\n\n[SupplyParameterFromForm(FormName = \"contact\")]\nprivate ContactModel? Contact { get; set; }\n```\n\n### Enhanced navigation for forms\n\nAdd `Enhance` for SPA-like form submissions without full page reload:\n\n```razor\n\u003CEditForm Model=\"Model\" OnValidSubmit=\"Save\" FormName=\"quick\" Enhance>\n```\n\nEnhanced forms submit via `fetch`, patch the DOM, and preserve scroll position. The page stays interactive-feeling even in SSR.\n\n### Plain HTML forms\n\nWhen using raw `\u003Cform>` instead of `EditForm` in SSR, add the antiforgery token manually:\n\n```razor\n\u003Cform method=\"post\" @onsubmit=\"Submit\" @formname=\"raw-form\">\n    \u003CAntiforgeryToken \u002F>\n    \u003Cinput name=\"Model.Name\" value=\"@Model?.Name\" \u002F>\n    \u003Cbutton type=\"submit\">Send\u003C\u002Fbutton>\n\u003C\u002Fform>\n```\n\n`EditForm` includes the antiforgery token automatically.\n\n## File Upload\n\n`InputFile` works in **interactive modes only** — not in Static SSR.\n\n```razor\n\u003CInputFile OnChange=\"OnFileSelected\" accept=\".pdf,.jpg,.png\" \u002F>\n\n@code {\n    private IBrowserFile? selectedFile;\n\n    private async Task OnFileSelected(InputFileChangeEventArgs e)\n    {\n        selectedFile = e.File;\n\n        \u002F\u002F Read stream with size limit\n        await using var stream = selectedFile.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);\n        \u002F\u002F Process stream — save to disk, upload to storage, etc.\n    }\n}\n```\n\nStream size limits:\n- **Server:** Default ~30 KB SignalR message size. Call `OpenReadStream(maxAllowedSize)` to increase. Large files stream over the circuit.\n- **WebAssembly:** File is read in the browser. No SignalR limit, but memory constrained.\n\nFor multiple files:\n\n```razor\n\u003CInputFile OnChange=\"OnFilesSelected\" multiple \u002F>\n\n@code {\n    private async Task OnFilesSelected(InputFileChangeEventArgs e)\n    {\n        foreach (var file in e.GetMultipleFiles(maxAllowedFiles: 10))\n        {\n            await using var stream = file.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);\n            \u002F\u002F Process each file\n        }\n    }\n}\n```\n\n## Prevent Double Submission\n\nDisable the submit button while processing:\n\n```razor\n\u003Cbutton type=\"submit\" disabled=\"@isSubmitting\">\n    @(isSubmitting ? \"Saving...\" : \"Save\")\n\u003C\u002Fbutton>\n\n@code {\n    private bool isSubmitting;\n\n    private async Task HandleSubmit()\n    {\n        isSubmitting = true;\n        try\n        {\n            await SaveService.SaveAsync(Model!);\n        }\n        finally\n        {\n            isSubmitting = false;\n        }\n    }\n}\n```\n\n## Custom Validation CSS\n\nReplace the default `valid`\u002F`invalid` CSS classes:\n\n```csharp\npublic class BootstrapFieldCssClassProvider : FieldCssClassProvider\n{\n    public override string GetFieldCssClass(EditContext editContext, in FieldIdentifier fieldIdentifier)\n    {\n        var isValid = !editContext.GetValidationMessages(fieldIdentifier).Any();\n        return editContext.IsModified(fieldIdentifier)\n            ? (isValid ? \"is-valid\" : \"is-invalid\")\n            : \"\";\n    }\n}\n```\n\nApply to the form:\n\n```csharp\nprotected override void OnInitialized()\n{\n    editContext = new EditContext(model);\n    editContext.SetFieldCssClassProvider(new BootstrapFieldCssClassProvider());\n}\n```\n\n## Don'ts\n\n- Don't use `@bind` or `@oninput` in Static SSR forms — they require interactivity. Use `[SupplyParameterFromForm]` and `FormName`.\n- Don't forget `Model ??= new()` in `OnInitialized` — the model is null on GET, populated on POST.\n- Don't use `OnSubmit` together with `OnValidSubmit`\u002F`OnInvalidSubmit` — they're mutually exclusive.\n- Don't omit `\u003CDataAnnotationsValidator \u002F>` — validation attributes are silently ignored without it.\n- Don't omit `FormName` in SSR when a page has multiple forms — both forms will fire on any submission.\n- Don't use `InputFile` in Static SSR — it requires an interactive render mode.\n- Don't use both `Model` and `EditContext` on an `EditForm` — pick one.\n- Don't forget `\u003CAntiforgeryToken \u002F>` in plain `\u003Cform>` elements — the server rejects the POST without it.\n",{"data":38,"body":39},{"license":28,"name":4,"description":6},{"type":40,"children":41},"root",[42,50,57,87,217,299,305,338,345,562,574,632,638,651,714,728,734,840,863,869,1172,1207,1213,1274,1280,1349,1355,1361,1366,1480,1500,1505,1530,1536,1541,1801,1806,1969,1975,1981,1986,2076,2082,2187,2193,2205,2211,2216,2254,2293,2299,2311,2334,2346,2391,2397,2409,2423,2436,2442,2462,2509,2519,2525,2542,2654,2659,2690,2695,2791,2797,2802,2958,2964,2984,3067,3072,3115,3121,3276],{"type":43,"tag":44,"props":45,"children":46},"element","h1",{"id":4},[47],{"type":48,"value":49},"text","Collect User Input",{"type":43,"tag":51,"props":52,"children":54},"h2",{"id":53},"step-1-read-the-projects-agentsmd",[55],{"type":48,"value":56},"Step 1 — Read the Project's AGENTS.md",{"type":43,"tag":58,"props":59,"children":60},"p",{},[61,63,70,72,78,80,85],{"type":48,"value":62},"Check ",{"type":43,"tag":64,"props":65,"children":67},"code",{"className":66},[],[68],{"type":48,"value":69},"AGENTS.md",{"type":48,"value":71}," for ",{"type":43,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":48,"value":77},"Interactivity Mode",{"type":48,"value":79}," and ",{"type":43,"tag":73,"props":81,"children":82},{},[83],{"type":48,"value":84},"Interactivity Scope",{"type":48,"value":86},". This determines which form patterns apply:",{"type":43,"tag":88,"props":89,"children":90},"table",{},[91,110],{"type":43,"tag":92,"props":93,"children":94},"thead",{},[95],{"type":43,"tag":96,"props":97,"children":98},"tr",{},[99,105],{"type":43,"tag":100,"props":101,"children":102},"th",{},[103],{"type":48,"value":104},"Mode",{"type":43,"tag":100,"props":106,"children":107},{},[108],{"type":48,"value":109},"Form mechanism",{"type":43,"tag":111,"props":112,"children":113},"tbody",{},[114,166,191,204],{"type":43,"tag":96,"props":115,"children":116},{},[117,123],{"type":43,"tag":118,"props":119,"children":120},"td",{},[121],{"type":48,"value":122},"None (Static SSR)",{"type":43,"tag":118,"props":124,"children":125},{},[126,132,134,140,142,148,150,156,158,164],{"type":43,"tag":64,"props":127,"children":129},{"className":128},[],[130],{"type":48,"value":131},"EditForm",{"type":48,"value":133}," with ",{"type":43,"tag":64,"props":135,"children":137},{"className":136},[],[138],{"type":48,"value":139},"FormName",{"type":48,"value":141}," + ",{"type":43,"tag":64,"props":143,"children":145},{"className":144},[],[146],{"type":48,"value":147},"[SupplyParameterFromForm]",{"type":48,"value":149},". No ",{"type":43,"tag":64,"props":151,"children":153},{"className":152},[],[154],{"type":48,"value":155},"@bind",{"type":48,"value":157},", no ",{"type":43,"tag":64,"props":159,"children":161},{"className":160},[],[162],{"type":48,"value":163},"@onchange",{"type":48,"value":165},".",{"type":43,"tag":96,"props":167,"children":168},{},[169,174],{"type":43,"tag":118,"props":170,"children":171},{},[172],{"type":48,"value":173},"Server",{"type":43,"tag":118,"props":175,"children":176},{},[177,182,183,189],{"type":43,"tag":64,"props":178,"children":180},{"className":179},[],[181],{"type":48,"value":131},{"type":48,"value":133},{"type":43,"tag":64,"props":184,"children":186},{"className":185},[],[187],{"type":48,"value":188},"@bind-Value",{"type":48,"value":190},". Full interactivity — real-time validation, dynamic UI.",{"type":43,"tag":96,"props":192,"children":193},{},[194,199],{"type":43,"tag":118,"props":195,"children":196},{},[197],{"type":48,"value":198},"WebAssembly",{"type":43,"tag":118,"props":200,"children":201},{},[202],{"type":48,"value":203},"Same as Server, but validators needing server data must call APIs.",{"type":43,"tag":96,"props":205,"children":206},{},[207,212],{"type":43,"tag":118,"props":208,"children":209},{},[210],{"type":48,"value":211},"Auto",{"type":43,"tag":118,"props":213,"children":214},{},[215],{"type":48,"value":216},"Same as WebAssembly — code must work in both browser and server.",{"type":43,"tag":88,"props":218,"children":219},{},[220,236],{"type":43,"tag":92,"props":221,"children":222},{},[223],{"type":43,"tag":96,"props":224,"children":225},{},[226,231],{"type":43,"tag":100,"props":227,"children":228},{},[229],{"type":48,"value":230},"Scope",{"type":43,"tag":100,"props":232,"children":233},{},[234],{"type":48,"value":235},"Impact",{"type":43,"tag":111,"props":237,"children":238},{},[239,259],{"type":43,"tag":96,"props":240,"children":241},{},[242,247],{"type":43,"tag":118,"props":243,"children":244},{},[245],{"type":48,"value":246},"Global",{"type":43,"tag":118,"props":248,"children":249},{},[250,252,257],{"type":48,"value":251},"All forms are interactive. ",{"type":43,"tag":64,"props":253,"children":255},{"className":254},[],[256],{"type":48,"value":139},{"type":48,"value":258}," only needed when explicitly opting a page to static SSR.",{"type":43,"tag":96,"props":260,"children":261},{},[262,267],{"type":43,"tag":118,"props":263,"children":264},{},[265],{"type":48,"value":266},"Per-page",{"type":43,"tag":118,"props":268,"children":269},{},[270,272,277,278,283,285,291,293,298],{"type":48,"value":271},"Forms in static pages use ",{"type":43,"tag":64,"props":273,"children":275},{"className":274},[],[276],{"type":48,"value":139},{"type":48,"value":141},{"type":43,"tag":64,"props":279,"children":281},{"className":280},[],[282],{"type":48,"value":147},{"type":48,"value":284},". Forms in ",{"type":43,"tag":64,"props":286,"children":288},{"className":287},[],[289],{"type":48,"value":290},"@rendermode",{"type":48,"value":292}," pages use ",{"type":43,"tag":64,"props":294,"children":296},{"className":295},[],[297],{"type":48,"value":188},{"type":48,"value":165},{"type":43,"tag":51,"props":300,"children":302},{"id":301},"editform-setup",[303],{"type":48,"value":304},"EditForm Setup",{"type":43,"tag":58,"props":306,"children":307},{},[308,313,315,320,322,328,330,336],{"type":43,"tag":64,"props":309,"children":311},{"className":310},[],[312],{"type":48,"value":131},{"type":48,"value":314}," requires ",{"type":43,"tag":73,"props":316,"children":317},{},[318],{"type":48,"value":319},"either",{"type":48,"value":321}," ",{"type":43,"tag":64,"props":323,"children":325},{"className":324},[],[326],{"type":48,"value":327},"Model",{"type":48,"value":329}," or ",{"type":43,"tag":64,"props":331,"children":333},{"className":332},[],[334],{"type":48,"value":335},"EditContext",{"type":48,"value":337}," — never both.",{"type":43,"tag":339,"props":340,"children":342},"h3",{"id":341},"model-based-default",[343],{"type":48,"value":344},"Model-based (default)",{"type":43,"tag":346,"props":347,"children":352},"pre",{"className":348,"code":349,"language":350,"meta":351,"style":351},"language-razor shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003CEditForm Model=\"Employee\" OnValidSubmit=\"HandleSubmit\" FormName=\"employee\">\n    \u003CDataAnnotationsValidator \u002F>\n    \u003CValidationSummary \u002F>\n\n    \u003Clabel>\n        Name: \u003CInputText @bind-Value=\"Employee!.Name\" \u002F>\n        \u003CValidationMessage For=\"() => Employee!.Name\" \u002F>\n    \u003C\u002Flabel>\n\n    \u003Cbutton type=\"submit\">Save\u003C\u002Fbutton>\n\u003C\u002FEditForm>\n\n@code {\n    [SupplyParameterFromForm]\n    private EmployeeModel? Employee { get; set; }\n\n    protected override void OnInitialized() => Employee ??= new();\n\n    private async Task HandleSubmit()\n    {\n        \u002F\u002F Save Employee\n    }\n}\n","razor","",[353],{"type":43,"tag":64,"props":354,"children":355},{"__ignoreMap":351},[356,367,376,385,395,404,413,422,431,439,448,457,465,474,483,492,500,509,517,526,535,544,553],{"type":43,"tag":357,"props":358,"children":361},"span",{"class":359,"line":360},"line",1,[362],{"type":43,"tag":357,"props":363,"children":364},{},[365],{"type":48,"value":366},"\u003CEditForm Model=\"Employee\" OnValidSubmit=\"HandleSubmit\" FormName=\"employee\">\n",{"type":43,"tag":357,"props":368,"children":370},{"class":359,"line":369},2,[371],{"type":43,"tag":357,"props":372,"children":373},{},[374],{"type":48,"value":375},"    \u003CDataAnnotationsValidator \u002F>\n",{"type":43,"tag":357,"props":377,"children":379},{"class":359,"line":378},3,[380],{"type":43,"tag":357,"props":381,"children":382},{},[383],{"type":48,"value":384},"    \u003CValidationSummary \u002F>\n",{"type":43,"tag":357,"props":386,"children":388},{"class":359,"line":387},4,[389],{"type":43,"tag":357,"props":390,"children":392},{"emptyLinePlaceholder":391},true,[393],{"type":48,"value":394},"\n",{"type":43,"tag":357,"props":396,"children":398},{"class":359,"line":397},5,[399],{"type":43,"tag":357,"props":400,"children":401},{},[402],{"type":48,"value":403},"    \u003Clabel>\n",{"type":43,"tag":357,"props":405,"children":407},{"class":359,"line":406},6,[408],{"type":43,"tag":357,"props":409,"children":410},{},[411],{"type":48,"value":412},"        Name: \u003CInputText @bind-Value=\"Employee!.Name\" \u002F>\n",{"type":43,"tag":357,"props":414,"children":416},{"class":359,"line":415},7,[417],{"type":43,"tag":357,"props":418,"children":419},{},[420],{"type":48,"value":421},"        \u003CValidationMessage For=\"() => Employee!.Name\" \u002F>\n",{"type":43,"tag":357,"props":423,"children":425},{"class":359,"line":424},8,[426],{"type":43,"tag":357,"props":427,"children":428},{},[429],{"type":48,"value":430},"    \u003C\u002Flabel>\n",{"type":43,"tag":357,"props":432,"children":434},{"class":359,"line":433},9,[435],{"type":43,"tag":357,"props":436,"children":437},{"emptyLinePlaceholder":391},[438],{"type":48,"value":394},{"type":43,"tag":357,"props":440,"children":442},{"class":359,"line":441},10,[443],{"type":43,"tag":357,"props":444,"children":445},{},[446],{"type":48,"value":447},"    \u003Cbutton type=\"submit\">Save\u003C\u002Fbutton>\n",{"type":43,"tag":357,"props":449,"children":451},{"class":359,"line":450},11,[452],{"type":43,"tag":357,"props":453,"children":454},{},[455],{"type":48,"value":456},"\u003C\u002FEditForm>\n",{"type":43,"tag":357,"props":458,"children":460},{"class":359,"line":459},12,[461],{"type":43,"tag":357,"props":462,"children":463},{"emptyLinePlaceholder":391},[464],{"type":48,"value":394},{"type":43,"tag":357,"props":466,"children":468},{"class":359,"line":467},13,[469],{"type":43,"tag":357,"props":470,"children":471},{},[472],{"type":48,"value":473},"@code {\n",{"type":43,"tag":357,"props":475,"children":477},{"class":359,"line":476},14,[478],{"type":43,"tag":357,"props":479,"children":480},{},[481],{"type":48,"value":482},"    [SupplyParameterFromForm]\n",{"type":43,"tag":357,"props":484,"children":486},{"class":359,"line":485},15,[487],{"type":43,"tag":357,"props":488,"children":489},{},[490],{"type":48,"value":491},"    private EmployeeModel? Employee { get; set; }\n",{"type":43,"tag":357,"props":493,"children":495},{"class":359,"line":494},16,[496],{"type":43,"tag":357,"props":497,"children":498},{"emptyLinePlaceholder":391},[499],{"type":48,"value":394},{"type":43,"tag":357,"props":501,"children":503},{"class":359,"line":502},17,[504],{"type":43,"tag":357,"props":505,"children":506},{},[507],{"type":48,"value":508},"    protected override void OnInitialized() => Employee ??= new();\n",{"type":43,"tag":357,"props":510,"children":512},{"class":359,"line":511},18,[513],{"type":43,"tag":357,"props":514,"children":515},{"emptyLinePlaceholder":391},[516],{"type":48,"value":394},{"type":43,"tag":357,"props":518,"children":520},{"class":359,"line":519},19,[521],{"type":43,"tag":357,"props":522,"children":523},{},[524],{"type":48,"value":525},"    private async Task HandleSubmit()\n",{"type":43,"tag":357,"props":527,"children":529},{"class":359,"line":528},20,[530],{"type":43,"tag":357,"props":531,"children":532},{},[533],{"type":48,"value":534},"    {\n",{"type":43,"tag":357,"props":536,"children":538},{"class":359,"line":537},21,[539],{"type":43,"tag":357,"props":540,"children":541},{},[542],{"type":48,"value":543},"        \u002F\u002F Save Employee\n",{"type":43,"tag":357,"props":545,"children":547},{"class":359,"line":546},22,[548],{"type":43,"tag":357,"props":549,"children":550},{},[551],{"type":48,"value":552},"    }\n",{"type":43,"tag":357,"props":554,"children":556},{"class":359,"line":555},23,[557],{"type":43,"tag":357,"props":558,"children":559},{},[560],{"type":48,"value":561},"}\n",{"type":43,"tag":58,"props":563,"children":564},{},[565,567,572],{"type":48,"value":566},"This single pattern works in ",{"type":43,"tag":73,"props":568,"children":569},{},[570],{"type":48,"value":571},"both",{"type":48,"value":573}," SSR and interactive modes:",{"type":43,"tag":575,"props":576,"children":577},"ul",{},[578,606],{"type":43,"tag":579,"props":580,"children":581},"li",{},[582,584,589,591,596,598,604],{"type":48,"value":583},"In SSR: ",{"type":43,"tag":64,"props":585,"children":587},{"className":586},[],[588],{"type":48,"value":139},{"type":48,"value":590}," identifies the form, ",{"type":43,"tag":64,"props":592,"children":594},{"className":593},[],[595],{"type":48,"value":147},{"type":48,"value":597}," binds POST data, ",{"type":43,"tag":64,"props":599,"children":601},{"className":600},[],[602],{"type":48,"value":603},"??=",{"type":48,"value":605}," initializes on GET.",{"type":43,"tag":579,"props":607,"children":608},{},[609,611,616,618,623,625,630],{"type":48,"value":610},"In interactive: ",{"type":43,"tag":64,"props":612,"children":614},{"className":613},[],[615],{"type":48,"value":188},{"type":48,"value":617}," provides two-way binding, ",{"type":43,"tag":64,"props":619,"children":621},{"className":620},[],[622],{"type":48,"value":147},{"type":48,"value":624}," is ignored, ",{"type":43,"tag":64,"props":626,"children":628},{"className":627},[],[629],{"type":48,"value":139},{"type":48,"value":631}," is harmless.",{"type":43,"tag":339,"props":633,"children":635},{"id":634},"editcontext-based-advanced",[636],{"type":48,"value":637},"EditContext-based (advanced)",{"type":43,"tag":58,"props":639,"children":640},{},[641,643,649],{"type":48,"value":642},"Use when you need programmatic field tracking, dynamic validation rules, or manual ",{"type":43,"tag":64,"props":644,"children":646},{"className":645},[],[647],{"type":48,"value":648},"EditContext.Validate()",{"type":48,"value":650}," calls:",{"type":43,"tag":346,"props":652,"children":656},{"className":653,"code":654,"language":655,"meta":351,"style":351},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","private EditContext? editContext;\nprivate EmployeeModel model = new();\n\nprotected override void OnInitialized()\n{\n    editContext = new EditContext(model);\n}\n","csharp",[657],{"type":43,"tag":64,"props":658,"children":659},{"__ignoreMap":351},[660,668,676,683,691,699,707],{"type":43,"tag":357,"props":661,"children":662},{"class":359,"line":360},[663],{"type":43,"tag":357,"props":664,"children":665},{},[666],{"type":48,"value":667},"private EditContext? editContext;\n",{"type":43,"tag":357,"props":669,"children":670},{"class":359,"line":369},[671],{"type":43,"tag":357,"props":672,"children":673},{},[674],{"type":48,"value":675},"private EmployeeModel model = new();\n",{"type":43,"tag":357,"props":677,"children":678},{"class":359,"line":378},[679],{"type":43,"tag":357,"props":680,"children":681},{"emptyLinePlaceholder":391},[682],{"type":48,"value":394},{"type":43,"tag":357,"props":684,"children":685},{"class":359,"line":387},[686],{"type":43,"tag":357,"props":687,"children":688},{},[689],{"type":48,"value":690},"protected override void OnInitialized()\n",{"type":43,"tag":357,"props":692,"children":693},{"class":359,"line":397},[694],{"type":43,"tag":357,"props":695,"children":696},{},[697],{"type":48,"value":698},"{\n",{"type":43,"tag":357,"props":700,"children":701},{"class":359,"line":406},[702],{"type":43,"tag":357,"props":703,"children":704},{},[705],{"type":48,"value":706},"    editContext = new EditContext(model);\n",{"type":43,"tag":357,"props":708,"children":709},{"class":359,"line":415},[710],{"type":43,"tag":357,"props":711,"children":712},{},[713],{"type":48,"value":561},{"type":43,"tag":346,"props":715,"children":717},{"className":348,"code":716,"language":350,"meta":351,"style":351},"\u003CEditForm EditContext=\"editContext\" OnValidSubmit=\"HandleSubmit\" FormName=\"employee\">\n",[718],{"type":43,"tag":64,"props":719,"children":720},{"__ignoreMap":351},[721],{"type":43,"tag":357,"props":722,"children":723},{"class":359,"line":360},[724],{"type":43,"tag":357,"props":725,"children":726},{},[727],{"type":48,"value":716},{"type":43,"tag":51,"props":729,"children":731},{"id":730},"submit-handlers",[732],{"type":48,"value":733},"Submit Handlers",{"type":43,"tag":88,"props":735,"children":736},{},[737,758],{"type":43,"tag":92,"props":738,"children":739},{},[740],{"type":43,"tag":96,"props":741,"children":742},{},[743,748,753],{"type":43,"tag":100,"props":744,"children":745},{},[746],{"type":48,"value":747},"Handler",{"type":43,"tag":100,"props":749,"children":750},{},[751],{"type":48,"value":752},"Fires when",{"type":43,"tag":100,"props":754,"children":755},{},[756],{"type":48,"value":757},"Use when",{"type":43,"tag":111,"props":759,"children":760},{},[761,789,811],{"type":43,"tag":96,"props":762,"children":763},{},[764,773,778],{"type":43,"tag":118,"props":765,"children":766},{},[767],{"type":43,"tag":64,"props":768,"children":770},{"className":769},[],[771],{"type":48,"value":772},"OnValidSubmit",{"type":43,"tag":118,"props":774,"children":775},{},[776],{"type":48,"value":777},"Validation passes",{"type":43,"tag":118,"props":779,"children":780},{},[781,783],{"type":48,"value":782},"Standard forms with ",{"type":43,"tag":64,"props":784,"children":786},{"className":785},[],[787],{"type":48,"value":788},"DataAnnotationsValidator",{"type":43,"tag":96,"props":790,"children":791},{},[792,801,806],{"type":43,"tag":118,"props":793,"children":794},{},[795],{"type":43,"tag":64,"props":796,"children":798},{"className":797},[],[799],{"type":48,"value":800},"OnInvalidSubmit",{"type":43,"tag":118,"props":802,"children":803},{},[804],{"type":48,"value":805},"Validation fails",{"type":43,"tag":118,"props":807,"children":808},{},[809],{"type":48,"value":810},"Need custom handling for invalid state",{"type":43,"tag":96,"props":812,"children":813},{},[814,823,828],{"type":43,"tag":118,"props":815,"children":816},{},[817],{"type":43,"tag":64,"props":818,"children":820},{"className":819},[],[821],{"type":48,"value":822},"OnSubmit",{"type":43,"tag":118,"props":824,"children":825},{},[826],{"type":48,"value":827},"Always — validation is manual",{"type":43,"tag":118,"props":829,"children":830},{},[831,833,838],{"type":48,"value":832},"Using ",{"type":43,"tag":64,"props":834,"children":836},{"className":835},[],[837],{"type":48,"value":648},{"type":48,"value":839}," yourself",{"type":43,"tag":58,"props":841,"children":842},{},[843,848,850,855,857,862],{"type":43,"tag":64,"props":844,"children":846},{"className":845},[],[847],{"type":48,"value":822},{"type":48,"value":849}," cannot combine with ",{"type":43,"tag":64,"props":851,"children":853},{"className":852},[],[854],{"type":48,"value":772},{"type":48,"value":856},"\u002F",{"type":43,"tag":64,"props":858,"children":860},{"className":859},[],[861],{"type":48,"value":800},{"type":48,"value":165},{"type":43,"tag":51,"props":864,"children":866},{"id":865},"built-in-input-components",[867],{"type":48,"value":868},"Built-in Input Components",{"type":43,"tag":88,"props":870,"children":871},{},[872,893],{"type":43,"tag":92,"props":873,"children":874},{},[875],{"type":43,"tag":96,"props":876,"children":877},{},[878,883,888],{"type":43,"tag":100,"props":879,"children":880},{},[881],{"type":48,"value":882},"Component",{"type":43,"tag":100,"props":884,"children":885},{},[886],{"type":48,"value":887},"Binds to",{"type":43,"tag":100,"props":889,"children":890},{},[891],{"type":48,"value":892},"Notes",{"type":43,"tag":111,"props":894,"children":895},{},[896,928,958,1004,1049,1080,1112,1146],{"type":43,"tag":96,"props":897,"children":898},{},[899,908,917],{"type":43,"tag":118,"props":900,"children":901},{},[902],{"type":43,"tag":64,"props":903,"children":905},{"className":904},[],[906],{"type":48,"value":907},"InputText",{"type":43,"tag":118,"props":909,"children":910},{},[911],{"type":43,"tag":64,"props":912,"children":914},{"className":913},[],[915],{"type":48,"value":916},"string",{"type":43,"tag":118,"props":918,"children":919},{},[920,922],{"type":48,"value":921},"Renders ",{"type":43,"tag":64,"props":923,"children":925},{"className":924},[],[926],{"type":48,"value":927},"\u003Cinput type=\"text\">",{"type":43,"tag":96,"props":929,"children":930},{},[931,940,948],{"type":43,"tag":118,"props":932,"children":933},{},[934],{"type":43,"tag":64,"props":935,"children":937},{"className":936},[],[938],{"type":48,"value":939},"InputTextArea",{"type":43,"tag":118,"props":941,"children":942},{},[943],{"type":43,"tag":64,"props":944,"children":946},{"className":945},[],[947],{"type":48,"value":916},{"type":43,"tag":118,"props":949,"children":950},{},[951,952],{"type":48,"value":921},{"type":43,"tag":64,"props":953,"children":955},{"className":954},[],[956],{"type":48,"value":957},"\u003Ctextarea>",{"type":43,"tag":96,"props":959,"children":960},{},[961,970,994],{"type":43,"tag":118,"props":962,"children":963},{},[964],{"type":43,"tag":64,"props":965,"children":967},{"className":966},[],[968],{"type":48,"value":969},"InputNumber\u003CT>",{"type":43,"tag":118,"props":971,"children":972},{},[973,979,981,987,988],{"type":43,"tag":64,"props":974,"children":976},{"className":975},[],[977],{"type":48,"value":978},"int",{"type":48,"value":980},", ",{"type":43,"tag":64,"props":982,"children":984},{"className":983},[],[985],{"type":48,"value":986},"double",{"type":48,"value":980},{"type":43,"tag":64,"props":989,"children":991},{"className":990},[],[992],{"type":48,"value":993},"decimal",{"type":43,"tag":118,"props":995,"children":996},{},[997,998],{"type":48,"value":921},{"type":43,"tag":64,"props":999,"children":1001},{"className":1000},[],[1002],{"type":48,"value":1003},"\u003Cinput type=\"number\">",{"type":43,"tag":96,"props":1005,"children":1006},{},[1007,1016,1039],{"type":43,"tag":118,"props":1008,"children":1009},{},[1010],{"type":43,"tag":64,"props":1011,"children":1013},{"className":1012},[],[1014],{"type":48,"value":1015},"InputDate\u003CT>",{"type":43,"tag":118,"props":1017,"children":1018},{},[1019,1025,1026,1032,1033],{"type":43,"tag":64,"props":1020,"children":1022},{"className":1021},[],[1023],{"type":48,"value":1024},"DateTime",{"type":48,"value":980},{"type":43,"tag":64,"props":1027,"children":1029},{"className":1028},[],[1030],{"type":48,"value":1031},"DateOnly",{"type":48,"value":980},{"type":43,"tag":64,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":48,"value":1038},"DateTimeOffset",{"type":43,"tag":118,"props":1040,"children":1041},{},[1042,1043],{"type":48,"value":921},{"type":43,"tag":64,"props":1044,"children":1046},{"className":1045},[],[1047],{"type":48,"value":1048},"\u003Cinput type=\"date\">",{"type":43,"tag":96,"props":1050,"children":1051},{},[1052,1061,1070],{"type":43,"tag":118,"props":1053,"children":1054},{},[1055],{"type":43,"tag":64,"props":1056,"children":1058},{"className":1057},[],[1059],{"type":48,"value":1060},"InputCheckbox",{"type":43,"tag":118,"props":1062,"children":1063},{},[1064],{"type":43,"tag":64,"props":1065,"children":1067},{"className":1066},[],[1068],{"type":48,"value":1069},"bool",{"type":43,"tag":118,"props":1071,"children":1072},{},[1073,1074],{"type":48,"value":921},{"type":43,"tag":64,"props":1075,"children":1077},{"className":1076},[],[1078],{"type":48,"value":1079},"\u003Cinput type=\"checkbox\">",{"type":43,"tag":96,"props":1081,"children":1082},{},[1083,1092,1102],{"type":43,"tag":118,"props":1084,"children":1085},{},[1086],{"type":43,"tag":64,"props":1087,"children":1089},{"className":1088},[],[1090],{"type":48,"value":1091},"InputSelect\u003CT>",{"type":43,"tag":118,"props":1093,"children":1094},{},[1095,1100],{"type":43,"tag":64,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":48,"value":916},{"type":48,"value":1101},", enums, numeric types",{"type":43,"tag":118,"props":1103,"children":1104},{},[1105,1106],{"type":48,"value":921},{"type":43,"tag":64,"props":1107,"children":1109},{"className":1108},[],[1110],{"type":48,"value":1111},"\u003Cselect>",{"type":43,"tag":96,"props":1113,"children":1114},{},[1115,1124,1133],{"type":43,"tag":118,"props":1116,"children":1117},{},[1118],{"type":43,"tag":64,"props":1119,"children":1121},{"className":1120},[],[1122],{"type":48,"value":1123},"InputRadioGroup\u003CT>",{"type":43,"tag":118,"props":1125,"children":1126},{},[1127,1132],{"type":43,"tag":64,"props":1128,"children":1130},{"className":1129},[],[1131],{"type":48,"value":916},{"type":48,"value":1101},{"type":43,"tag":118,"props":1134,"children":1135},{},[1136,1138,1144],{"type":48,"value":1137},"Wraps ",{"type":43,"tag":64,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":48,"value":1143},"InputRadio\u003CT>",{"type":48,"value":1145}," children",{"type":43,"tag":96,"props":1147,"children":1148},{},[1149,1158,1167],{"type":43,"tag":118,"props":1150,"children":1151},{},[1152],{"type":43,"tag":64,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":48,"value":1157},"InputFile",{"type":43,"tag":118,"props":1159,"children":1160},{},[1161],{"type":43,"tag":64,"props":1162,"children":1164},{"className":1163},[],[1165],{"type":48,"value":1166},"IBrowserFile",{"type":43,"tag":118,"props":1168,"children":1169},{},[1170],{"type":48,"value":1171},"File upload — interactive modes only",{"type":43,"tag":58,"props":1173,"children":1174},{},[1175,1177,1182,1184,1190,1192,1198,1199,1205],{"type":48,"value":1176},"All input components use ",{"type":43,"tag":64,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":48,"value":188},{"type":48,"value":1183}," for binding. Always wrap text in a ",{"type":43,"tag":64,"props":1185,"children":1187},{"className":1186},[],[1188],{"type":48,"value":1189},"\u003Clabel>",{"type":48,"value":1191}," or use ",{"type":43,"tag":64,"props":1193,"children":1195},{"className":1194},[],[1196],{"type":48,"value":1197},"id",{"type":48,"value":856},{"type":43,"tag":64,"props":1200,"children":1202},{"className":1201},[],[1203],{"type":48,"value":1204},"for",{"type":48,"value":1206}," attributes for accessibility.",{"type":43,"tag":339,"props":1208,"children":1210},{"id":1209},"inputselect-with-enum-values",[1211],{"type":48,"value":1212},"InputSelect with enum values",{"type":43,"tag":346,"props":1214,"children":1216},{"className":348,"code":1215,"language":350,"meta":351,"style":351},"\u003CInputSelect @bind-Value=\"Model!.Status\">\n    \u003Coption value=\"\">-- Select --\u003C\u002Foption>\n    @foreach (var value in Enum.GetValues\u003COrderStatus>())\n    {\n        \u003Coption value=\"@value\">@value\u003C\u002Foption>\n    }\n\u003C\u002FInputSelect>\n",[1217],{"type":43,"tag":64,"props":1218,"children":1219},{"__ignoreMap":351},[1220,1228,1236,1244,1251,1259,1266],{"type":43,"tag":357,"props":1221,"children":1222},{"class":359,"line":360},[1223],{"type":43,"tag":357,"props":1224,"children":1225},{},[1226],{"type":48,"value":1227},"\u003CInputSelect @bind-Value=\"Model!.Status\">\n",{"type":43,"tag":357,"props":1229,"children":1230},{"class":359,"line":369},[1231],{"type":43,"tag":357,"props":1232,"children":1233},{},[1234],{"type":48,"value":1235},"    \u003Coption value=\"\">-- Select --\u003C\u002Foption>\n",{"type":43,"tag":357,"props":1237,"children":1238},{"class":359,"line":378},[1239],{"type":43,"tag":357,"props":1240,"children":1241},{},[1242],{"type":48,"value":1243},"    @foreach (var value in Enum.GetValues\u003COrderStatus>())\n",{"type":43,"tag":357,"props":1245,"children":1246},{"class":359,"line":387},[1247],{"type":43,"tag":357,"props":1248,"children":1249},{},[1250],{"type":48,"value":534},{"type":43,"tag":357,"props":1252,"children":1253},{"class":359,"line":397},[1254],{"type":43,"tag":357,"props":1255,"children":1256},{},[1257],{"type":48,"value":1258},"        \u003Coption value=\"@value\">@value\u003C\u002Foption>\n",{"type":43,"tag":357,"props":1260,"children":1261},{"class":359,"line":406},[1262],{"type":43,"tag":357,"props":1263,"children":1264},{},[1265],{"type":48,"value":552},{"type":43,"tag":357,"props":1267,"children":1268},{"class":359,"line":415},[1269],{"type":43,"tag":357,"props":1270,"children":1271},{},[1272],{"type":48,"value":1273},"\u003C\u002FInputSelect>\n",{"type":43,"tag":339,"props":1275,"children":1277},{"id":1276},"inputradiogroup",[1278],{"type":48,"value":1279},"InputRadioGroup",{"type":43,"tag":346,"props":1281,"children":1283},{"className":348,"code":1282,"language":350,"meta":351,"style":351},"\u003CInputRadioGroup @bind-Value=\"Model!.Priority\">\n    @foreach (var p in Enum.GetValues\u003CPriority>())\n    {\n        \u003Clabel>\n            \u003CInputRadio Value=\"p\" \u002F> @p\n        \u003C\u002Flabel>\n    }\n\u003C\u002FInputRadioGroup>\n",[1284],{"type":43,"tag":64,"props":1285,"children":1286},{"__ignoreMap":351},[1287,1295,1303,1310,1318,1326,1334,1341],{"type":43,"tag":357,"props":1288,"children":1289},{"class":359,"line":360},[1290],{"type":43,"tag":357,"props":1291,"children":1292},{},[1293],{"type":48,"value":1294},"\u003CInputRadioGroup @bind-Value=\"Model!.Priority\">\n",{"type":43,"tag":357,"props":1296,"children":1297},{"class":359,"line":369},[1298],{"type":43,"tag":357,"props":1299,"children":1300},{},[1301],{"type":48,"value":1302},"    @foreach (var p in Enum.GetValues\u003CPriority>())\n",{"type":43,"tag":357,"props":1304,"children":1305},{"class":359,"line":378},[1306],{"type":43,"tag":357,"props":1307,"children":1308},{},[1309],{"type":48,"value":534},{"type":43,"tag":357,"props":1311,"children":1312},{"class":359,"line":387},[1313],{"type":43,"tag":357,"props":1314,"children":1315},{},[1316],{"type":48,"value":1317},"        \u003Clabel>\n",{"type":43,"tag":357,"props":1319,"children":1320},{"class":359,"line":397},[1321],{"type":43,"tag":357,"props":1322,"children":1323},{},[1324],{"type":48,"value":1325},"            \u003CInputRadio Value=\"p\" \u002F> @p\n",{"type":43,"tag":357,"props":1327,"children":1328},{"class":359,"line":406},[1329],{"type":43,"tag":357,"props":1330,"children":1331},{},[1332],{"type":48,"value":1333},"        \u003C\u002Flabel>\n",{"type":43,"tag":357,"props":1335,"children":1336},{"class":359,"line":415},[1337],{"type":43,"tag":357,"props":1338,"children":1339},{},[1340],{"type":48,"value":552},{"type":43,"tag":357,"props":1342,"children":1343},{"class":359,"line":424},[1344],{"type":43,"tag":357,"props":1345,"children":1346},{},[1347],{"type":48,"value":1348},"\u003C\u002FInputRadioGroup>\n",{"type":43,"tag":51,"props":1350,"children":1352},{"id":1351},"validation",[1353],{"type":48,"value":1354},"Validation",{"type":43,"tag":339,"props":1356,"children":1358},{"id":1357},"data-annotations",[1359],{"type":48,"value":1360},"Data annotations",{"type":43,"tag":58,"props":1362,"children":1363},{},[1364],{"type":48,"value":1365},"Define validation rules on the model:",{"type":43,"tag":346,"props":1367,"children":1369},{"className":653,"code":1368,"language":655,"meta":351,"style":351},"public class EmployeeModel\n{\n    [Required, StringLength(100)]\n    public string? Name { get; set; }\n\n    [Required, EmailAddress]\n    public string? Email { get; set; }\n\n    [Range(18, 99)]\n    public int Age { get; set; }\n\n    [Required]\n    public string? Department { get; set; }\n}\n",[1370],{"type":43,"tag":64,"props":1371,"children":1372},{"__ignoreMap":351},[1373,1381,1388,1396,1404,1411,1419,1427,1434,1442,1450,1457,1465,1473],{"type":43,"tag":357,"props":1374,"children":1375},{"class":359,"line":360},[1376],{"type":43,"tag":357,"props":1377,"children":1378},{},[1379],{"type":48,"value":1380},"public class EmployeeModel\n",{"type":43,"tag":357,"props":1382,"children":1383},{"class":359,"line":369},[1384],{"type":43,"tag":357,"props":1385,"children":1386},{},[1387],{"type":48,"value":698},{"type":43,"tag":357,"props":1389,"children":1390},{"class":359,"line":378},[1391],{"type":43,"tag":357,"props":1392,"children":1393},{},[1394],{"type":48,"value":1395},"    [Required, StringLength(100)]\n",{"type":43,"tag":357,"props":1397,"children":1398},{"class":359,"line":387},[1399],{"type":43,"tag":357,"props":1400,"children":1401},{},[1402],{"type":48,"value":1403},"    public string? Name { get; set; }\n",{"type":43,"tag":357,"props":1405,"children":1406},{"class":359,"line":397},[1407],{"type":43,"tag":357,"props":1408,"children":1409},{"emptyLinePlaceholder":391},[1410],{"type":48,"value":394},{"type":43,"tag":357,"props":1412,"children":1413},{"class":359,"line":406},[1414],{"type":43,"tag":357,"props":1415,"children":1416},{},[1417],{"type":48,"value":1418},"    [Required, EmailAddress]\n",{"type":43,"tag":357,"props":1420,"children":1421},{"class":359,"line":415},[1422],{"type":43,"tag":357,"props":1423,"children":1424},{},[1425],{"type":48,"value":1426},"    public string? Email { get; set; }\n",{"type":43,"tag":357,"props":1428,"children":1429},{"class":359,"line":424},[1430],{"type":43,"tag":357,"props":1431,"children":1432},{"emptyLinePlaceholder":391},[1433],{"type":48,"value":394},{"type":43,"tag":357,"props":1435,"children":1436},{"class":359,"line":433},[1437],{"type":43,"tag":357,"props":1438,"children":1439},{},[1440],{"type":48,"value":1441},"    [Range(18, 99)]\n",{"type":43,"tag":357,"props":1443,"children":1444},{"class":359,"line":441},[1445],{"type":43,"tag":357,"props":1446,"children":1447},{},[1448],{"type":48,"value":1449},"    public int Age { get; set; }\n",{"type":43,"tag":357,"props":1451,"children":1452},{"class":359,"line":450},[1453],{"type":43,"tag":357,"props":1454,"children":1455},{"emptyLinePlaceholder":391},[1456],{"type":48,"value":394},{"type":43,"tag":357,"props":1458,"children":1459},{"class":359,"line":459},[1460],{"type":43,"tag":357,"props":1461,"children":1462},{},[1463],{"type":48,"value":1464},"    [Required]\n",{"type":43,"tag":357,"props":1466,"children":1467},{"class":359,"line":467},[1468],{"type":43,"tag":357,"props":1469,"children":1470},{},[1471],{"type":48,"value":1472},"    public string? Department { get; set; }\n",{"type":43,"tag":357,"props":1474,"children":1475},{"class":359,"line":476},[1476],{"type":43,"tag":357,"props":1477,"children":1478},{},[1479],{"type":48,"value":561},{"type":43,"tag":58,"props":1481,"children":1482},{},[1483,1485,1491,1493,1498],{"type":48,"value":1484},"Add ",{"type":43,"tag":64,"props":1486,"children":1488},{"className":1487},[],[1489],{"type":48,"value":1490},"\u003CDataAnnotationsValidator \u002F>",{"type":48,"value":1492}," inside ",{"type":43,"tag":64,"props":1494,"children":1496},{"className":1495},[],[1497],{"type":48,"value":131},{"type":48,"value":1499}," — without it, annotation attributes are silently ignored.",{"type":43,"tag":58,"props":1501,"children":1502},{},[1503],{"type":48,"value":1504},"Display errors with:",{"type":43,"tag":575,"props":1506,"children":1507},{},[1508,1519],{"type":43,"tag":579,"props":1509,"children":1510},{},[1511,1517],{"type":43,"tag":64,"props":1512,"children":1514},{"className":1513},[],[1515],{"type":48,"value":1516},"\u003CValidationSummary \u002F>",{"type":48,"value":1518}," — all errors in a list",{"type":43,"tag":579,"props":1520,"children":1521},{},[1522,1528],{"type":43,"tag":64,"props":1523,"children":1525},{"className":1524},[],[1526],{"type":48,"value":1527},"\u003CValidationMessage For=\"() => Model!.FieldName\" \u002F>",{"type":48,"value":1529}," — per-field inline errors",{"type":43,"tag":339,"props":1531,"children":1533},{"id":1532},"custom-validator-component",[1534],{"type":48,"value":1535},"Custom validator component",{"type":43,"tag":58,"props":1537,"children":1538},{},[1539],{"type":48,"value":1540},"For server-round-trip validation (uniqueness checks, business rules):",{"type":43,"tag":346,"props":1542,"children":1544},{"className":653,"code":1543,"language":655,"meta":351,"style":351},"public class CustomValidator : ComponentBase\n{\n    [CascadingParameter]\n    private EditContext? EditContext { get; set; }\n\n    private ValidationMessageStore? messageStore;\n\n    protected override void OnInitialized()\n    {\n        messageStore = new ValidationMessageStore(EditContext!);\n        EditContext!.OnValidationRequested += (s, e) => messageStore.Clear();\n        EditContext!.OnFieldChanged += (s, e) => messageStore.Clear(e.FieldIdentifier);\n    }\n\n    public void DisplayErrors(Dictionary\u003Cstring, List\u003Cstring>> errors)\n    {\n        foreach (var (field, messages) in errors)\n        {\n            foreach (var message in messages)\n            {\n                messageStore!.Add(EditContext!.Field(field), message);\n            }\n        }\n        EditContext!.NotifyValidationStateChanged();\n    }\n\n    public void ClearErrors()\n    {\n        messageStore?.Clear();\n        EditContext?.NotifyValidationStateChanged();\n    }\n}\n",[1545],{"type":43,"tag":64,"props":1546,"children":1547},{"__ignoreMap":351},[1548,1556,1563,1571,1579,1586,1594,1601,1609,1616,1624,1632,1640,1647,1654,1662,1669,1677,1685,1693,1701,1709,1717,1725,1734,1742,1750,1759,1767,1776,1785,1793],{"type":43,"tag":357,"props":1549,"children":1550},{"class":359,"line":360},[1551],{"type":43,"tag":357,"props":1552,"children":1553},{},[1554],{"type":48,"value":1555},"public class CustomValidator : ComponentBase\n",{"type":43,"tag":357,"props":1557,"children":1558},{"class":359,"line":369},[1559],{"type":43,"tag":357,"props":1560,"children":1561},{},[1562],{"type":48,"value":698},{"type":43,"tag":357,"props":1564,"children":1565},{"class":359,"line":378},[1566],{"type":43,"tag":357,"props":1567,"children":1568},{},[1569],{"type":48,"value":1570},"    [CascadingParameter]\n",{"type":43,"tag":357,"props":1572,"children":1573},{"class":359,"line":387},[1574],{"type":43,"tag":357,"props":1575,"children":1576},{},[1577],{"type":48,"value":1578},"    private EditContext? EditContext { get; set; }\n",{"type":43,"tag":357,"props":1580,"children":1581},{"class":359,"line":397},[1582],{"type":43,"tag":357,"props":1583,"children":1584},{"emptyLinePlaceholder":391},[1585],{"type":48,"value":394},{"type":43,"tag":357,"props":1587,"children":1588},{"class":359,"line":406},[1589],{"type":43,"tag":357,"props":1590,"children":1591},{},[1592],{"type":48,"value":1593},"    private ValidationMessageStore? messageStore;\n",{"type":43,"tag":357,"props":1595,"children":1596},{"class":359,"line":415},[1597],{"type":43,"tag":357,"props":1598,"children":1599},{"emptyLinePlaceholder":391},[1600],{"type":48,"value":394},{"type":43,"tag":357,"props":1602,"children":1603},{"class":359,"line":424},[1604],{"type":43,"tag":357,"props":1605,"children":1606},{},[1607],{"type":48,"value":1608},"    protected override void OnInitialized()\n",{"type":43,"tag":357,"props":1610,"children":1611},{"class":359,"line":433},[1612],{"type":43,"tag":357,"props":1613,"children":1614},{},[1615],{"type":48,"value":534},{"type":43,"tag":357,"props":1617,"children":1618},{"class":359,"line":441},[1619],{"type":43,"tag":357,"props":1620,"children":1621},{},[1622],{"type":48,"value":1623},"        messageStore = new ValidationMessageStore(EditContext!);\n",{"type":43,"tag":357,"props":1625,"children":1626},{"class":359,"line":450},[1627],{"type":43,"tag":357,"props":1628,"children":1629},{},[1630],{"type":48,"value":1631},"        EditContext!.OnValidationRequested += (s, e) => messageStore.Clear();\n",{"type":43,"tag":357,"props":1633,"children":1634},{"class":359,"line":459},[1635],{"type":43,"tag":357,"props":1636,"children":1637},{},[1638],{"type":48,"value":1639},"        EditContext!.OnFieldChanged += (s, e) => messageStore.Clear(e.FieldIdentifier);\n",{"type":43,"tag":357,"props":1641,"children":1642},{"class":359,"line":467},[1643],{"type":43,"tag":357,"props":1644,"children":1645},{},[1646],{"type":48,"value":552},{"type":43,"tag":357,"props":1648,"children":1649},{"class":359,"line":476},[1650],{"type":43,"tag":357,"props":1651,"children":1652},{"emptyLinePlaceholder":391},[1653],{"type":48,"value":394},{"type":43,"tag":357,"props":1655,"children":1656},{"class":359,"line":485},[1657],{"type":43,"tag":357,"props":1658,"children":1659},{},[1660],{"type":48,"value":1661},"    public void DisplayErrors(Dictionary\u003Cstring, List\u003Cstring>> errors)\n",{"type":43,"tag":357,"props":1663,"children":1664},{"class":359,"line":494},[1665],{"type":43,"tag":357,"props":1666,"children":1667},{},[1668],{"type":48,"value":534},{"type":43,"tag":357,"props":1670,"children":1671},{"class":359,"line":502},[1672],{"type":43,"tag":357,"props":1673,"children":1674},{},[1675],{"type":48,"value":1676},"        foreach (var (field, messages) in errors)\n",{"type":43,"tag":357,"props":1678,"children":1679},{"class":359,"line":511},[1680],{"type":43,"tag":357,"props":1681,"children":1682},{},[1683],{"type":48,"value":1684},"        {\n",{"type":43,"tag":357,"props":1686,"children":1687},{"class":359,"line":519},[1688],{"type":43,"tag":357,"props":1689,"children":1690},{},[1691],{"type":48,"value":1692},"            foreach (var message in messages)\n",{"type":43,"tag":357,"props":1694,"children":1695},{"class":359,"line":528},[1696],{"type":43,"tag":357,"props":1697,"children":1698},{},[1699],{"type":48,"value":1700},"            {\n",{"type":43,"tag":357,"props":1702,"children":1703},{"class":359,"line":537},[1704],{"type":43,"tag":357,"props":1705,"children":1706},{},[1707],{"type":48,"value":1708},"                messageStore!.Add(EditContext!.Field(field), message);\n",{"type":43,"tag":357,"props":1710,"children":1711},{"class":359,"line":546},[1712],{"type":43,"tag":357,"props":1713,"children":1714},{},[1715],{"type":48,"value":1716},"            }\n",{"type":43,"tag":357,"props":1718,"children":1719},{"class":359,"line":555},[1720],{"type":43,"tag":357,"props":1721,"children":1722},{},[1723],{"type":48,"value":1724},"        }\n",{"type":43,"tag":357,"props":1726,"children":1728},{"class":359,"line":1727},24,[1729],{"type":43,"tag":357,"props":1730,"children":1731},{},[1732],{"type":48,"value":1733},"        EditContext!.NotifyValidationStateChanged();\n",{"type":43,"tag":357,"props":1735,"children":1737},{"class":359,"line":1736},25,[1738],{"type":43,"tag":357,"props":1739,"children":1740},{},[1741],{"type":48,"value":552},{"type":43,"tag":357,"props":1743,"children":1745},{"class":359,"line":1744},26,[1746],{"type":43,"tag":357,"props":1747,"children":1748},{"emptyLinePlaceholder":391},[1749],{"type":48,"value":394},{"type":43,"tag":357,"props":1751,"children":1753},{"class":359,"line":1752},27,[1754],{"type":43,"tag":357,"props":1755,"children":1756},{},[1757],{"type":48,"value":1758},"    public void ClearErrors()\n",{"type":43,"tag":357,"props":1760,"children":1762},{"class":359,"line":1761},28,[1763],{"type":43,"tag":357,"props":1764,"children":1765},{},[1766],{"type":48,"value":534},{"type":43,"tag":357,"props":1768,"children":1770},{"class":359,"line":1769},29,[1771],{"type":43,"tag":357,"props":1772,"children":1773},{},[1774],{"type":48,"value":1775},"        messageStore?.Clear();\n",{"type":43,"tag":357,"props":1777,"children":1779},{"class":359,"line":1778},30,[1780],{"type":43,"tag":357,"props":1781,"children":1782},{},[1783],{"type":48,"value":1784},"        EditContext?.NotifyValidationStateChanged();\n",{"type":43,"tag":357,"props":1786,"children":1788},{"class":359,"line":1787},31,[1789],{"type":43,"tag":357,"props":1790,"children":1791},{},[1792],{"type":48,"value":552},{"type":43,"tag":357,"props":1794,"children":1796},{"class":359,"line":1795},32,[1797],{"type":43,"tag":357,"props":1798,"children":1799},{},[1800],{"type":48,"value":561},{"type":43,"tag":58,"props":1802,"children":1803},{},[1804],{"type":48,"value":1805},"Usage in a form:",{"type":43,"tag":346,"props":1807,"children":1809},{"className":348,"code":1808,"language":350,"meta":351,"style":351},"\u003CEditForm Model=\"Model\" OnValidSubmit=\"HandleSubmit\" FormName=\"register\">\n    \u003CDataAnnotationsValidator \u002F>\n    \u003CCustomValidator @ref=\"customValidator\" \u002F>\n    \u003CValidationSummary \u002F>\n    @* inputs *@\n\u003C\u002FEditForm>\n\n@code {\n    private CustomValidator? customValidator;\n\n    private async Task HandleSubmit()\n    {\n        var errors = await RegistrationService.ValidateAsync(Model!);\n        if (errors.Count > 0)\n        {\n            customValidator!.DisplayErrors(errors);\n            return;\n        }\n        \u002F\u002F proceed\n    }\n}\n",[1810],{"type":43,"tag":64,"props":1811,"children":1812},{"__ignoreMap":351},[1813,1821,1828,1836,1843,1851,1858,1865,1872,1880,1887,1894,1901,1909,1917,1924,1932,1940,1947,1955,1962],{"type":43,"tag":357,"props":1814,"children":1815},{"class":359,"line":360},[1816],{"type":43,"tag":357,"props":1817,"children":1818},{},[1819],{"type":48,"value":1820},"\u003CEditForm Model=\"Model\" OnValidSubmit=\"HandleSubmit\" FormName=\"register\">\n",{"type":43,"tag":357,"props":1822,"children":1823},{"class":359,"line":369},[1824],{"type":43,"tag":357,"props":1825,"children":1826},{},[1827],{"type":48,"value":375},{"type":43,"tag":357,"props":1829,"children":1830},{"class":359,"line":378},[1831],{"type":43,"tag":357,"props":1832,"children":1833},{},[1834],{"type":48,"value":1835},"    \u003CCustomValidator @ref=\"customValidator\" \u002F>\n",{"type":43,"tag":357,"props":1837,"children":1838},{"class":359,"line":387},[1839],{"type":43,"tag":357,"props":1840,"children":1841},{},[1842],{"type":48,"value":384},{"type":43,"tag":357,"props":1844,"children":1845},{"class":359,"line":397},[1846],{"type":43,"tag":357,"props":1847,"children":1848},{},[1849],{"type":48,"value":1850},"    @* inputs *@\n",{"type":43,"tag":357,"props":1852,"children":1853},{"class":359,"line":406},[1854],{"type":43,"tag":357,"props":1855,"children":1856},{},[1857],{"type":48,"value":456},{"type":43,"tag":357,"props":1859,"children":1860},{"class":359,"line":415},[1861],{"type":43,"tag":357,"props":1862,"children":1863},{"emptyLinePlaceholder":391},[1864],{"type":48,"value":394},{"type":43,"tag":357,"props":1866,"children":1867},{"class":359,"line":424},[1868],{"type":43,"tag":357,"props":1869,"children":1870},{},[1871],{"type":48,"value":473},{"type":43,"tag":357,"props":1873,"children":1874},{"class":359,"line":433},[1875],{"type":43,"tag":357,"props":1876,"children":1877},{},[1878],{"type":48,"value":1879},"    private CustomValidator? customValidator;\n",{"type":43,"tag":357,"props":1881,"children":1882},{"class":359,"line":441},[1883],{"type":43,"tag":357,"props":1884,"children":1885},{"emptyLinePlaceholder":391},[1886],{"type":48,"value":394},{"type":43,"tag":357,"props":1888,"children":1889},{"class":359,"line":450},[1890],{"type":43,"tag":357,"props":1891,"children":1892},{},[1893],{"type":48,"value":525},{"type":43,"tag":357,"props":1895,"children":1896},{"class":359,"line":459},[1897],{"type":43,"tag":357,"props":1898,"children":1899},{},[1900],{"type":48,"value":534},{"type":43,"tag":357,"props":1902,"children":1903},{"class":359,"line":467},[1904],{"type":43,"tag":357,"props":1905,"children":1906},{},[1907],{"type":48,"value":1908},"        var errors = await RegistrationService.ValidateAsync(Model!);\n",{"type":43,"tag":357,"props":1910,"children":1911},{"class":359,"line":476},[1912],{"type":43,"tag":357,"props":1913,"children":1914},{},[1915],{"type":48,"value":1916},"        if (errors.Count > 0)\n",{"type":43,"tag":357,"props":1918,"children":1919},{"class":359,"line":485},[1920],{"type":43,"tag":357,"props":1921,"children":1922},{},[1923],{"type":48,"value":1684},{"type":43,"tag":357,"props":1925,"children":1926},{"class":359,"line":494},[1927],{"type":43,"tag":357,"props":1928,"children":1929},{},[1930],{"type":48,"value":1931},"            customValidator!.DisplayErrors(errors);\n",{"type":43,"tag":357,"props":1933,"children":1934},{"class":359,"line":502},[1935],{"type":43,"tag":357,"props":1936,"children":1937},{},[1938],{"type":48,"value":1939},"            return;\n",{"type":43,"tag":357,"props":1941,"children":1942},{"class":359,"line":511},[1943],{"type":43,"tag":357,"props":1944,"children":1945},{},[1946],{"type":48,"value":1724},{"type":43,"tag":357,"props":1948,"children":1949},{"class":359,"line":519},[1950],{"type":43,"tag":357,"props":1951,"children":1952},{},[1953],{"type":48,"value":1954},"        \u002F\u002F proceed\n",{"type":43,"tag":357,"props":1956,"children":1957},{"class":359,"line":528},[1958],{"type":43,"tag":357,"props":1959,"children":1960},{},[1961],{"type":48,"value":552},{"type":43,"tag":357,"props":1963,"children":1964},{"class":359,"line":537},[1965],{"type":43,"tag":357,"props":1966,"children":1967},{},[1968],{"type":48,"value":561},{"type":43,"tag":51,"props":1970,"children":1972},{"id":1971},"react-to-input-changes-interactive-only",[1973],{"type":48,"value":1974},"React to Input Changes (Interactive Only)",{"type":43,"tag":339,"props":1976,"children":1978},{"id":1977},"bindafter",[1979],{"type":48,"value":1980},"@bind:after",{"type":43,"tag":58,"props":1982,"children":1983},{},[1984],{"type":48,"value":1985},"Run logic after a bound value changes:",{"type":43,"tag":346,"props":1987,"children":1989},{"className":348,"code":1988,"language":350,"meta":351,"style":351},"\u003CInputText @bind-Value=\"Model!.ZipCode\" @bind:after=\"OnZipCodeChanged\" \u002F>\n\n@code {\n    private async Task OnZipCodeChanged()\n    {\n        \u002F\u002F Fetch city\u002Fstate based on new zip code\n        var location = await LocationService.LookupAsync(Model!.ZipCode);\n        Model.City = location?.City;\n        Model.State = location?.State;\n    }\n}\n",[1990],{"type":43,"tag":64,"props":1991,"children":1992},{"__ignoreMap":351},[1993,2001,2008,2015,2023,2030,2038,2046,2054,2062,2069],{"type":43,"tag":357,"props":1994,"children":1995},{"class":359,"line":360},[1996],{"type":43,"tag":357,"props":1997,"children":1998},{},[1999],{"type":48,"value":2000},"\u003CInputText @bind-Value=\"Model!.ZipCode\" @bind:after=\"OnZipCodeChanged\" \u002F>\n",{"type":43,"tag":357,"props":2002,"children":2003},{"class":359,"line":369},[2004],{"type":43,"tag":357,"props":2005,"children":2006},{"emptyLinePlaceholder":391},[2007],{"type":48,"value":394},{"type":43,"tag":357,"props":2009,"children":2010},{"class":359,"line":378},[2011],{"type":43,"tag":357,"props":2012,"children":2013},{},[2014],{"type":48,"value":473},{"type":43,"tag":357,"props":2016,"children":2017},{"class":359,"line":387},[2018],{"type":43,"tag":357,"props":2019,"children":2020},{},[2021],{"type":48,"value":2022},"    private async Task OnZipCodeChanged()\n",{"type":43,"tag":357,"props":2024,"children":2025},{"class":359,"line":397},[2026],{"type":43,"tag":357,"props":2027,"children":2028},{},[2029],{"type":48,"value":534},{"type":43,"tag":357,"props":2031,"children":2032},{"class":359,"line":406},[2033],{"type":43,"tag":357,"props":2034,"children":2035},{},[2036],{"type":48,"value":2037},"        \u002F\u002F Fetch city\u002Fstate based on new zip code\n",{"type":43,"tag":357,"props":2039,"children":2040},{"class":359,"line":415},[2041],{"type":43,"tag":357,"props":2042,"children":2043},{},[2044],{"type":48,"value":2045},"        var location = await LocationService.LookupAsync(Model!.ZipCode);\n",{"type":43,"tag":357,"props":2047,"children":2048},{"class":359,"line":424},[2049],{"type":43,"tag":357,"props":2050,"children":2051},{},[2052],{"type":48,"value":2053},"        Model.City = location?.City;\n",{"type":43,"tag":357,"props":2055,"children":2056},{"class":359,"line":433},[2057],{"type":43,"tag":357,"props":2058,"children":2059},{},[2060],{"type":48,"value":2061},"        Model.State = location?.State;\n",{"type":43,"tag":357,"props":2063,"children":2064},{"class":359,"line":441},[2065],{"type":43,"tag":357,"props":2066,"children":2067},{},[2068],{"type":48,"value":552},{"type":43,"tag":357,"props":2070,"children":2071},{"class":359,"line":450},[2072],{"type":43,"tag":357,"props":2073,"children":2074},{},[2075],{"type":48,"value":561},{"type":43,"tag":339,"props":2077,"children":2079},{"id":2078},"oninput-for-real-time-filtering",[2080],{"type":48,"value":2081},"@oninput for real-time filtering",{"type":43,"tag":346,"props":2083,"children":2085},{"className":348,"code":2084,"language":350,"meta":351,"style":351},"\u003Cinput type=\"text\" @oninput=\"OnSearchInput\" placeholder=\"Search...\" \u002F>\n\n@code {\n    private string searchTerm = \"\";\n    private List\u003CItem> filteredItems = new();\n\n    private void OnSearchInput(ChangeEventArgs e)\n    {\n        searchTerm = e.Value?.ToString() ?? \"\";\n        filteredItems = allItems.Where(i =>\n            i.Name.Contains(searchTerm, StringComparison.OrdinalIgnoreCase)).ToList();\n    }\n}\n",[2086],{"type":43,"tag":64,"props":2087,"children":2088},{"__ignoreMap":351},[2089,2097,2104,2111,2119,2127,2134,2142,2149,2157,2165,2173,2180],{"type":43,"tag":357,"props":2090,"children":2091},{"class":359,"line":360},[2092],{"type":43,"tag":357,"props":2093,"children":2094},{},[2095],{"type":48,"value":2096},"\u003Cinput type=\"text\" @oninput=\"OnSearchInput\" placeholder=\"Search...\" \u002F>\n",{"type":43,"tag":357,"props":2098,"children":2099},{"class":359,"line":369},[2100],{"type":43,"tag":357,"props":2101,"children":2102},{"emptyLinePlaceholder":391},[2103],{"type":48,"value":394},{"type":43,"tag":357,"props":2105,"children":2106},{"class":359,"line":378},[2107],{"type":43,"tag":357,"props":2108,"children":2109},{},[2110],{"type":48,"value":473},{"type":43,"tag":357,"props":2112,"children":2113},{"class":359,"line":387},[2114],{"type":43,"tag":357,"props":2115,"children":2116},{},[2117],{"type":48,"value":2118},"    private string searchTerm = \"\";\n",{"type":43,"tag":357,"props":2120,"children":2121},{"class":359,"line":397},[2122],{"type":43,"tag":357,"props":2123,"children":2124},{},[2125],{"type":48,"value":2126},"    private List\u003CItem> filteredItems = new();\n",{"type":43,"tag":357,"props":2128,"children":2129},{"class":359,"line":406},[2130],{"type":43,"tag":357,"props":2131,"children":2132},{"emptyLinePlaceholder":391},[2133],{"type":48,"value":394},{"type":43,"tag":357,"props":2135,"children":2136},{"class":359,"line":415},[2137],{"type":43,"tag":357,"props":2138,"children":2139},{},[2140],{"type":48,"value":2141},"    private void OnSearchInput(ChangeEventArgs e)\n",{"type":43,"tag":357,"props":2143,"children":2144},{"class":359,"line":424},[2145],{"type":43,"tag":357,"props":2146,"children":2147},{},[2148],{"type":48,"value":534},{"type":43,"tag":357,"props":2150,"children":2151},{"class":359,"line":433},[2152],{"type":43,"tag":357,"props":2153,"children":2154},{},[2155],{"type":48,"value":2156},"        searchTerm = e.Value?.ToString() ?? \"\";\n",{"type":43,"tag":357,"props":2158,"children":2159},{"class":359,"line":441},[2160],{"type":43,"tag":357,"props":2161,"children":2162},{},[2163],{"type":48,"value":2164},"        filteredItems = allItems.Where(i =>\n",{"type":43,"tag":357,"props":2166,"children":2167},{"class":359,"line":450},[2168],{"type":43,"tag":357,"props":2169,"children":2170},{},[2171],{"type":48,"value":2172},"            i.Name.Contains(searchTerm, StringComparison.OrdinalIgnoreCase)).ToList();\n",{"type":43,"tag":357,"props":2174,"children":2175},{"class":359,"line":459},[2176],{"type":43,"tag":357,"props":2177,"children":2178},{},[2179],{"type":48,"value":552},{"type":43,"tag":357,"props":2181,"children":2182},{"class":359,"line":467},[2183],{"type":43,"tag":357,"props":2184,"children":2185},{},[2186],{"type":48,"value":561},{"type":43,"tag":51,"props":2188,"children":2190},{"id":2189},"ssr-specific-patterns",[2191],{"type":48,"value":2192},"SSR-Specific Patterns",{"type":43,"tag":58,"props":2194,"children":2195},{},[2196,2198,2203],{"type":48,"value":2197},"These apply when the form renders in Static SSR (mode = None, or per-page without ",{"type":43,"tag":64,"props":2199,"children":2201},{"className":2200},[],[2202],{"type":48,"value":290},{"type":48,"value":2204},").",{"type":43,"tag":339,"props":2206,"children":2208},{"id":2207},"supplyparameterfromform",[2209],{"type":48,"value":2210},"SupplyParameterFromForm",{"type":43,"tag":58,"props":2212,"children":2213},{},[2214],{"type":48,"value":2215},"Binds POST data to a property on form submission:",{"type":43,"tag":346,"props":2217,"children":2219},{"className":653,"code":2218,"language":655,"meta":351,"style":351},"[SupplyParameterFromForm]\nprivate ContactModel? Contact { get; set; }\n\nprotected override void OnInitialized() => Contact ??= new();\n",[2220],{"type":43,"tag":64,"props":2221,"children":2222},{"__ignoreMap":351},[2223,2231,2239,2246],{"type":43,"tag":357,"props":2224,"children":2225},{"class":359,"line":360},[2226],{"type":43,"tag":357,"props":2227,"children":2228},{},[2229],{"type":48,"value":2230},"[SupplyParameterFromForm]\n",{"type":43,"tag":357,"props":2232,"children":2233},{"class":359,"line":369},[2234],{"type":43,"tag":357,"props":2235,"children":2236},{},[2237],{"type":48,"value":2238},"private ContactModel? Contact { get; set; }\n",{"type":43,"tag":357,"props":2240,"children":2241},{"class":359,"line":378},[2242],{"type":43,"tag":357,"props":2243,"children":2244},{"emptyLinePlaceholder":391},[2245],{"type":48,"value":394},{"type":43,"tag":357,"props":2247,"children":2248},{"class":359,"line":387},[2249],{"type":43,"tag":357,"props":2250,"children":2251},{},[2252],{"type":48,"value":2253},"protected override void OnInitialized() => Contact ??= new();\n",{"type":43,"tag":58,"props":2255,"children":2256},{},[2257,2262,2264,2269,2271,2277,2279,2284,2286,2291],{"type":43,"tag":73,"props":2258,"children":2259},{},[2260],{"type":48,"value":2261},"Critical:",{"type":48,"value":2263}," The ",{"type":43,"tag":64,"props":2265,"children":2267},{"className":2266},[],[2268],{"type":48,"value":603},{"type":48,"value":2270}," in ",{"type":43,"tag":64,"props":2272,"children":2274},{"className":2273},[],[2275],{"type":48,"value":2276},"OnInitialized",{"type":48,"value":2278}," is required. On GET the property is null — ",{"type":43,"tag":64,"props":2280,"children":2282},{"className":2281},[],[2283],{"type":48,"value":603},{"type":48,"value":2285}," creates the model. On POST the framework populates it — ",{"type":43,"tag":64,"props":2287,"children":2289},{"className":2288},[],[2290],{"type":48,"value":603},{"type":48,"value":2292}," preserves the posted values.",{"type":43,"tag":339,"props":2294,"children":2296},{"id":2295},"formname-multiple-forms-on-one-page",[2297],{"type":48,"value":2298},"FormName — multiple forms on one page",{"type":43,"tag":58,"props":2300,"children":2301},{},[2302,2304,2309],{"type":48,"value":2303},"Each form needs a unique ",{"type":43,"tag":64,"props":2305,"children":2307},{"className":2306},[],[2308],{"type":48,"value":139},{"type":48,"value":2310},":",{"type":43,"tag":346,"props":2312,"children":2314},{"className":348,"code":2313,"language":350,"meta":351,"style":351},"\u003CEditForm Model=\"Search\" OnSubmit=\"DoSearch\" FormName=\"search\">...\u003C\u002FEditForm>\n\u003CEditForm Model=\"Contact\" OnValidSubmit=\"SaveContact\" FormName=\"contact\">...\u003C\u002FEditForm>\n",[2315],{"type":43,"tag":64,"props":2316,"children":2317},{"__ignoreMap":351},[2318,2326],{"type":43,"tag":357,"props":2319,"children":2320},{"class":359,"line":360},[2321],{"type":43,"tag":357,"props":2322,"children":2323},{},[2324],{"type":48,"value":2325},"\u003CEditForm Model=\"Search\" OnSubmit=\"DoSearch\" FormName=\"search\">...\u003C\u002FEditForm>\n",{"type":43,"tag":357,"props":2327,"children":2328},{"class":359,"line":369},[2329],{"type":43,"tag":357,"props":2330,"children":2331},{},[2332],{"type":48,"value":2333},"\u003CEditForm Model=\"Contact\" OnValidSubmit=\"SaveContact\" FormName=\"contact\">...\u003C\u002FEditForm>\n",{"type":43,"tag":58,"props":2335,"children":2336},{},[2337,2339,2344],{"type":48,"value":2338},"Match ",{"type":43,"tag":64,"props":2340,"children":2342},{"className":2341},[],[2343],{"type":48,"value":147},{"type":48,"value":2345}," to its form:",{"type":43,"tag":346,"props":2347,"children":2349},{"className":653,"code":2348,"language":655,"meta":351,"style":351},"[SupplyParameterFromForm(FormName = \"search\")]\nprivate SearchModel? Search { get; set; }\n\n[SupplyParameterFromForm(FormName = \"contact\")]\nprivate ContactModel? Contact { get; set; }\n",[2350],{"type":43,"tag":64,"props":2351,"children":2352},{"__ignoreMap":351},[2353,2361,2369,2376,2384],{"type":43,"tag":357,"props":2354,"children":2355},{"class":359,"line":360},[2356],{"type":43,"tag":357,"props":2357,"children":2358},{},[2359],{"type":48,"value":2360},"[SupplyParameterFromForm(FormName = \"search\")]\n",{"type":43,"tag":357,"props":2362,"children":2363},{"class":359,"line":369},[2364],{"type":43,"tag":357,"props":2365,"children":2366},{},[2367],{"type":48,"value":2368},"private SearchModel? Search { get; set; }\n",{"type":43,"tag":357,"props":2370,"children":2371},{"class":359,"line":378},[2372],{"type":43,"tag":357,"props":2373,"children":2374},{"emptyLinePlaceholder":391},[2375],{"type":48,"value":394},{"type":43,"tag":357,"props":2377,"children":2378},{"class":359,"line":387},[2379],{"type":43,"tag":357,"props":2380,"children":2381},{},[2382],{"type":48,"value":2383},"[SupplyParameterFromForm(FormName = \"contact\")]\n",{"type":43,"tag":357,"props":2385,"children":2386},{"class":359,"line":397},[2387],{"type":43,"tag":357,"props":2388,"children":2389},{},[2390],{"type":48,"value":2238},{"type":43,"tag":339,"props":2392,"children":2394},{"id":2393},"enhanced-navigation-for-forms",[2395],{"type":48,"value":2396},"Enhanced navigation for forms",{"type":43,"tag":58,"props":2398,"children":2399},{},[2400,2401,2407],{"type":48,"value":1484},{"type":43,"tag":64,"props":2402,"children":2404},{"className":2403},[],[2405],{"type":48,"value":2406},"Enhance",{"type":48,"value":2408}," for SPA-like form submissions without full page reload:",{"type":43,"tag":346,"props":2410,"children":2412},{"className":348,"code":2411,"language":350,"meta":351,"style":351},"\u003CEditForm Model=\"Model\" OnValidSubmit=\"Save\" FormName=\"quick\" Enhance>\n",[2413],{"type":43,"tag":64,"props":2414,"children":2415},{"__ignoreMap":351},[2416],{"type":43,"tag":357,"props":2417,"children":2418},{"class":359,"line":360},[2419],{"type":43,"tag":357,"props":2420,"children":2421},{},[2422],{"type":48,"value":2411},{"type":43,"tag":58,"props":2424,"children":2425},{},[2426,2428,2434],{"type":48,"value":2427},"Enhanced forms submit via ",{"type":43,"tag":64,"props":2429,"children":2431},{"className":2430},[],[2432],{"type":48,"value":2433},"fetch",{"type":48,"value":2435},", patch the DOM, and preserve scroll position. The page stays interactive-feeling even in SSR.",{"type":43,"tag":339,"props":2437,"children":2439},{"id":2438},"plain-html-forms",[2440],{"type":48,"value":2441},"Plain HTML forms",{"type":43,"tag":58,"props":2443,"children":2444},{},[2445,2447,2453,2455,2460],{"type":48,"value":2446},"When using raw ",{"type":43,"tag":64,"props":2448,"children":2450},{"className":2449},[],[2451],{"type":48,"value":2452},"\u003Cform>",{"type":48,"value":2454}," instead of ",{"type":43,"tag":64,"props":2456,"children":2458},{"className":2457},[],[2459],{"type":48,"value":131},{"type":48,"value":2461}," in SSR, add the antiforgery token manually:",{"type":43,"tag":346,"props":2463,"children":2465},{"className":348,"code":2464,"language":350,"meta":351,"style":351},"\u003Cform method=\"post\" @onsubmit=\"Submit\" @formname=\"raw-form\">\n    \u003CAntiforgeryToken \u002F>\n    \u003Cinput name=\"Model.Name\" value=\"@Model?.Name\" \u002F>\n    \u003Cbutton type=\"submit\">Send\u003C\u002Fbutton>\n\u003C\u002Fform>\n",[2466],{"type":43,"tag":64,"props":2467,"children":2468},{"__ignoreMap":351},[2469,2477,2485,2493,2501],{"type":43,"tag":357,"props":2470,"children":2471},{"class":359,"line":360},[2472],{"type":43,"tag":357,"props":2473,"children":2474},{},[2475],{"type":48,"value":2476},"\u003Cform method=\"post\" @onsubmit=\"Submit\" @formname=\"raw-form\">\n",{"type":43,"tag":357,"props":2478,"children":2479},{"class":359,"line":369},[2480],{"type":43,"tag":357,"props":2481,"children":2482},{},[2483],{"type":48,"value":2484},"    \u003CAntiforgeryToken \u002F>\n",{"type":43,"tag":357,"props":2486,"children":2487},{"class":359,"line":378},[2488],{"type":43,"tag":357,"props":2489,"children":2490},{},[2491],{"type":48,"value":2492},"    \u003Cinput name=\"Model.Name\" value=\"@Model?.Name\" \u002F>\n",{"type":43,"tag":357,"props":2494,"children":2495},{"class":359,"line":387},[2496],{"type":43,"tag":357,"props":2497,"children":2498},{},[2499],{"type":48,"value":2500},"    \u003Cbutton type=\"submit\">Send\u003C\u002Fbutton>\n",{"type":43,"tag":357,"props":2502,"children":2503},{"class":359,"line":397},[2504],{"type":43,"tag":357,"props":2505,"children":2506},{},[2507],{"type":48,"value":2508},"\u003C\u002Fform>\n",{"type":43,"tag":58,"props":2510,"children":2511},{},[2512,2517],{"type":43,"tag":64,"props":2513,"children":2515},{"className":2514},[],[2516],{"type":48,"value":131},{"type":48,"value":2518}," includes the antiforgery token automatically.",{"type":43,"tag":51,"props":2520,"children":2522},{"id":2521},"file-upload",[2523],{"type":48,"value":2524},"File Upload",{"type":43,"tag":58,"props":2526,"children":2527},{},[2528,2533,2535,2540],{"type":43,"tag":64,"props":2529,"children":2531},{"className":2530},[],[2532],{"type":48,"value":1157},{"type":48,"value":2534}," works in ",{"type":43,"tag":73,"props":2536,"children":2537},{},[2538],{"type":48,"value":2539},"interactive modes only",{"type":48,"value":2541}," — not in Static SSR.",{"type":43,"tag":346,"props":2543,"children":2545},{"className":348,"code":2544,"language":350,"meta":351,"style":351},"\u003CInputFile OnChange=\"OnFileSelected\" accept=\".pdf,.jpg,.png\" \u002F>\n\n@code {\n    private IBrowserFile? selectedFile;\n\n    private async Task OnFileSelected(InputFileChangeEventArgs e)\n    {\n        selectedFile = e.File;\n\n        \u002F\u002F Read stream with size limit\n        await using var stream = selectedFile.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);\n        \u002F\u002F Process stream — save to disk, upload to storage, etc.\n    }\n}\n",[2546],{"type":43,"tag":64,"props":2547,"children":2548},{"__ignoreMap":351},[2549,2557,2564,2571,2579,2586,2594,2601,2609,2616,2624,2632,2640,2647],{"type":43,"tag":357,"props":2550,"children":2551},{"class":359,"line":360},[2552],{"type":43,"tag":357,"props":2553,"children":2554},{},[2555],{"type":48,"value":2556},"\u003CInputFile OnChange=\"OnFileSelected\" accept=\".pdf,.jpg,.png\" \u002F>\n",{"type":43,"tag":357,"props":2558,"children":2559},{"class":359,"line":369},[2560],{"type":43,"tag":357,"props":2561,"children":2562},{"emptyLinePlaceholder":391},[2563],{"type":48,"value":394},{"type":43,"tag":357,"props":2565,"children":2566},{"class":359,"line":378},[2567],{"type":43,"tag":357,"props":2568,"children":2569},{},[2570],{"type":48,"value":473},{"type":43,"tag":357,"props":2572,"children":2573},{"class":359,"line":387},[2574],{"type":43,"tag":357,"props":2575,"children":2576},{},[2577],{"type":48,"value":2578},"    private IBrowserFile? selectedFile;\n",{"type":43,"tag":357,"props":2580,"children":2581},{"class":359,"line":397},[2582],{"type":43,"tag":357,"props":2583,"children":2584},{"emptyLinePlaceholder":391},[2585],{"type":48,"value":394},{"type":43,"tag":357,"props":2587,"children":2588},{"class":359,"line":406},[2589],{"type":43,"tag":357,"props":2590,"children":2591},{},[2592],{"type":48,"value":2593},"    private async Task OnFileSelected(InputFileChangeEventArgs e)\n",{"type":43,"tag":357,"props":2595,"children":2596},{"class":359,"line":415},[2597],{"type":43,"tag":357,"props":2598,"children":2599},{},[2600],{"type":48,"value":534},{"type":43,"tag":357,"props":2602,"children":2603},{"class":359,"line":424},[2604],{"type":43,"tag":357,"props":2605,"children":2606},{},[2607],{"type":48,"value":2608},"        selectedFile = e.File;\n",{"type":43,"tag":357,"props":2610,"children":2611},{"class":359,"line":433},[2612],{"type":43,"tag":357,"props":2613,"children":2614},{"emptyLinePlaceholder":391},[2615],{"type":48,"value":394},{"type":43,"tag":357,"props":2617,"children":2618},{"class":359,"line":441},[2619],{"type":43,"tag":357,"props":2620,"children":2621},{},[2622],{"type":48,"value":2623},"        \u002F\u002F Read stream with size limit\n",{"type":43,"tag":357,"props":2625,"children":2626},{"class":359,"line":450},[2627],{"type":43,"tag":357,"props":2628,"children":2629},{},[2630],{"type":48,"value":2631},"        await using var stream = selectedFile.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);\n",{"type":43,"tag":357,"props":2633,"children":2634},{"class":359,"line":459},[2635],{"type":43,"tag":357,"props":2636,"children":2637},{},[2638],{"type":48,"value":2639},"        \u002F\u002F Process stream — save to disk, upload to storage, etc.\n",{"type":43,"tag":357,"props":2641,"children":2642},{"class":359,"line":467},[2643],{"type":43,"tag":357,"props":2644,"children":2645},{},[2646],{"type":48,"value":552},{"type":43,"tag":357,"props":2648,"children":2649},{"class":359,"line":476},[2650],{"type":43,"tag":357,"props":2651,"children":2652},{},[2653],{"type":48,"value":561},{"type":43,"tag":58,"props":2655,"children":2656},{},[2657],{"type":48,"value":2658},"Stream size limits:",{"type":43,"tag":575,"props":2660,"children":2661},{},[2662,2680],{"type":43,"tag":579,"props":2663,"children":2664},{},[2665,2670,2672,2678],{"type":43,"tag":73,"props":2666,"children":2667},{},[2668],{"type":48,"value":2669},"Server:",{"type":48,"value":2671}," Default ~30 KB SignalR message size. Call ",{"type":43,"tag":64,"props":2673,"children":2675},{"className":2674},[],[2676],{"type":48,"value":2677},"OpenReadStream(maxAllowedSize)",{"type":48,"value":2679}," to increase. Large files stream over the circuit.",{"type":43,"tag":579,"props":2681,"children":2682},{},[2683,2688],{"type":43,"tag":73,"props":2684,"children":2685},{},[2686],{"type":48,"value":2687},"WebAssembly:",{"type":48,"value":2689}," File is read in the browser. No SignalR limit, but memory constrained.",{"type":43,"tag":58,"props":2691,"children":2692},{},[2693],{"type":48,"value":2694},"For multiple files:",{"type":43,"tag":346,"props":2696,"children":2698},{"className":348,"code":2697,"language":350,"meta":351,"style":351},"\u003CInputFile OnChange=\"OnFilesSelected\" multiple \u002F>\n\n@code {\n    private async Task OnFilesSelected(InputFileChangeEventArgs e)\n    {\n        foreach (var file in e.GetMultipleFiles(maxAllowedFiles: 10))\n        {\n            await using var stream = file.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);\n            \u002F\u002F Process each file\n        }\n    }\n}\n",[2699],{"type":43,"tag":64,"props":2700,"children":2701},{"__ignoreMap":351},[2702,2710,2717,2724,2732,2739,2747,2754,2762,2770,2777,2784],{"type":43,"tag":357,"props":2703,"children":2704},{"class":359,"line":360},[2705],{"type":43,"tag":357,"props":2706,"children":2707},{},[2708],{"type":48,"value":2709},"\u003CInputFile OnChange=\"OnFilesSelected\" multiple \u002F>\n",{"type":43,"tag":357,"props":2711,"children":2712},{"class":359,"line":369},[2713],{"type":43,"tag":357,"props":2714,"children":2715},{"emptyLinePlaceholder":391},[2716],{"type":48,"value":394},{"type":43,"tag":357,"props":2718,"children":2719},{"class":359,"line":378},[2720],{"type":43,"tag":357,"props":2721,"children":2722},{},[2723],{"type":48,"value":473},{"type":43,"tag":357,"props":2725,"children":2726},{"class":359,"line":387},[2727],{"type":43,"tag":357,"props":2728,"children":2729},{},[2730],{"type":48,"value":2731},"    private async Task OnFilesSelected(InputFileChangeEventArgs e)\n",{"type":43,"tag":357,"props":2733,"children":2734},{"class":359,"line":397},[2735],{"type":43,"tag":357,"props":2736,"children":2737},{},[2738],{"type":48,"value":534},{"type":43,"tag":357,"props":2740,"children":2741},{"class":359,"line":406},[2742],{"type":43,"tag":357,"props":2743,"children":2744},{},[2745],{"type":48,"value":2746},"        foreach (var file in e.GetMultipleFiles(maxAllowedFiles: 10))\n",{"type":43,"tag":357,"props":2748,"children":2749},{"class":359,"line":415},[2750],{"type":43,"tag":357,"props":2751,"children":2752},{},[2753],{"type":48,"value":1684},{"type":43,"tag":357,"props":2755,"children":2756},{"class":359,"line":424},[2757],{"type":43,"tag":357,"props":2758,"children":2759},{},[2760],{"type":48,"value":2761},"            await using var stream = file.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);\n",{"type":43,"tag":357,"props":2763,"children":2764},{"class":359,"line":433},[2765],{"type":43,"tag":357,"props":2766,"children":2767},{},[2768],{"type":48,"value":2769},"            \u002F\u002F Process each file\n",{"type":43,"tag":357,"props":2771,"children":2772},{"class":359,"line":441},[2773],{"type":43,"tag":357,"props":2774,"children":2775},{},[2776],{"type":48,"value":1724},{"type":43,"tag":357,"props":2778,"children":2779},{"class":359,"line":450},[2780],{"type":43,"tag":357,"props":2781,"children":2782},{},[2783],{"type":48,"value":552},{"type":43,"tag":357,"props":2785,"children":2786},{"class":359,"line":459},[2787],{"type":43,"tag":357,"props":2788,"children":2789},{},[2790],{"type":48,"value":561},{"type":43,"tag":51,"props":2792,"children":2794},{"id":2793},"prevent-double-submission",[2795],{"type":48,"value":2796},"Prevent Double Submission",{"type":43,"tag":58,"props":2798,"children":2799},{},[2800],{"type":48,"value":2801},"Disable the submit button while processing:",{"type":43,"tag":346,"props":2803,"children":2805},{"className":348,"code":2804,"language":350,"meta":351,"style":351},"\u003Cbutton type=\"submit\" disabled=\"@isSubmitting\">\n    @(isSubmitting ? \"Saving...\" : \"Save\")\n\u003C\u002Fbutton>\n\n@code {\n    private bool isSubmitting;\n\n    private async Task HandleSubmit()\n    {\n        isSubmitting = true;\n        try\n        {\n            await SaveService.SaveAsync(Model!);\n        }\n        finally\n        {\n            isSubmitting = false;\n        }\n    }\n}\n",[2806],{"type":43,"tag":64,"props":2807,"children":2808},{"__ignoreMap":351},[2809,2817,2825,2833,2840,2847,2855,2862,2869,2876,2884,2892,2899,2907,2914,2922,2929,2937,2944,2951],{"type":43,"tag":357,"props":2810,"children":2811},{"class":359,"line":360},[2812],{"type":43,"tag":357,"props":2813,"children":2814},{},[2815],{"type":48,"value":2816},"\u003Cbutton type=\"submit\" disabled=\"@isSubmitting\">\n",{"type":43,"tag":357,"props":2818,"children":2819},{"class":359,"line":369},[2820],{"type":43,"tag":357,"props":2821,"children":2822},{},[2823],{"type":48,"value":2824},"    @(isSubmitting ? \"Saving...\" : \"Save\")\n",{"type":43,"tag":357,"props":2826,"children":2827},{"class":359,"line":378},[2828],{"type":43,"tag":357,"props":2829,"children":2830},{},[2831],{"type":48,"value":2832},"\u003C\u002Fbutton>\n",{"type":43,"tag":357,"props":2834,"children":2835},{"class":359,"line":387},[2836],{"type":43,"tag":357,"props":2837,"children":2838},{"emptyLinePlaceholder":391},[2839],{"type":48,"value":394},{"type":43,"tag":357,"props":2841,"children":2842},{"class":359,"line":397},[2843],{"type":43,"tag":357,"props":2844,"children":2845},{},[2846],{"type":48,"value":473},{"type":43,"tag":357,"props":2848,"children":2849},{"class":359,"line":406},[2850],{"type":43,"tag":357,"props":2851,"children":2852},{},[2853],{"type":48,"value":2854},"    private bool isSubmitting;\n",{"type":43,"tag":357,"props":2856,"children":2857},{"class":359,"line":415},[2858],{"type":43,"tag":357,"props":2859,"children":2860},{"emptyLinePlaceholder":391},[2861],{"type":48,"value":394},{"type":43,"tag":357,"props":2863,"children":2864},{"class":359,"line":424},[2865],{"type":43,"tag":357,"props":2866,"children":2867},{},[2868],{"type":48,"value":525},{"type":43,"tag":357,"props":2870,"children":2871},{"class":359,"line":433},[2872],{"type":43,"tag":357,"props":2873,"children":2874},{},[2875],{"type":48,"value":534},{"type":43,"tag":357,"props":2877,"children":2878},{"class":359,"line":441},[2879],{"type":43,"tag":357,"props":2880,"children":2881},{},[2882],{"type":48,"value":2883},"        isSubmitting = true;\n",{"type":43,"tag":357,"props":2885,"children":2886},{"class":359,"line":450},[2887],{"type":43,"tag":357,"props":2888,"children":2889},{},[2890],{"type":48,"value":2891},"        try\n",{"type":43,"tag":357,"props":2893,"children":2894},{"class":359,"line":459},[2895],{"type":43,"tag":357,"props":2896,"children":2897},{},[2898],{"type":48,"value":1684},{"type":43,"tag":357,"props":2900,"children":2901},{"class":359,"line":467},[2902],{"type":43,"tag":357,"props":2903,"children":2904},{},[2905],{"type":48,"value":2906},"            await SaveService.SaveAsync(Model!);\n",{"type":43,"tag":357,"props":2908,"children":2909},{"class":359,"line":476},[2910],{"type":43,"tag":357,"props":2911,"children":2912},{},[2913],{"type":48,"value":1724},{"type":43,"tag":357,"props":2915,"children":2916},{"class":359,"line":485},[2917],{"type":43,"tag":357,"props":2918,"children":2919},{},[2920],{"type":48,"value":2921},"        finally\n",{"type":43,"tag":357,"props":2923,"children":2924},{"class":359,"line":494},[2925],{"type":43,"tag":357,"props":2926,"children":2927},{},[2928],{"type":48,"value":1684},{"type":43,"tag":357,"props":2930,"children":2931},{"class":359,"line":502},[2932],{"type":43,"tag":357,"props":2933,"children":2934},{},[2935],{"type":48,"value":2936},"            isSubmitting = false;\n",{"type":43,"tag":357,"props":2938,"children":2939},{"class":359,"line":511},[2940],{"type":43,"tag":357,"props":2941,"children":2942},{},[2943],{"type":48,"value":1724},{"type":43,"tag":357,"props":2945,"children":2946},{"class":359,"line":519},[2947],{"type":43,"tag":357,"props":2948,"children":2949},{},[2950],{"type":48,"value":552},{"type":43,"tag":357,"props":2952,"children":2953},{"class":359,"line":528},[2954],{"type":43,"tag":357,"props":2955,"children":2956},{},[2957],{"type":48,"value":561},{"type":43,"tag":51,"props":2959,"children":2961},{"id":2960},"custom-validation-css",[2962],{"type":48,"value":2963},"Custom Validation CSS",{"type":43,"tag":58,"props":2965,"children":2966},{},[2967,2969,2975,2976,2982],{"type":48,"value":2968},"Replace the default ",{"type":43,"tag":64,"props":2970,"children":2972},{"className":2971},[],[2973],{"type":48,"value":2974},"valid",{"type":48,"value":856},{"type":43,"tag":64,"props":2977,"children":2979},{"className":2978},[],[2980],{"type":48,"value":2981},"invalid",{"type":48,"value":2983}," CSS classes:",{"type":43,"tag":346,"props":2985,"children":2987},{"className":653,"code":2986,"language":655,"meta":351,"style":351},"public class BootstrapFieldCssClassProvider : FieldCssClassProvider\n{\n    public override string GetFieldCssClass(EditContext editContext, in FieldIdentifier fieldIdentifier)\n    {\n        var isValid = !editContext.GetValidationMessages(fieldIdentifier).Any();\n        return editContext.IsModified(fieldIdentifier)\n            ? (isValid ? \"is-valid\" : \"is-invalid\")\n            : \"\";\n    }\n}\n",[2988],{"type":43,"tag":64,"props":2989,"children":2990},{"__ignoreMap":351},[2991,2999,3006,3014,3021,3029,3037,3045,3053,3060],{"type":43,"tag":357,"props":2992,"children":2993},{"class":359,"line":360},[2994],{"type":43,"tag":357,"props":2995,"children":2996},{},[2997],{"type":48,"value":2998},"public class BootstrapFieldCssClassProvider : FieldCssClassProvider\n",{"type":43,"tag":357,"props":3000,"children":3001},{"class":359,"line":369},[3002],{"type":43,"tag":357,"props":3003,"children":3004},{},[3005],{"type":48,"value":698},{"type":43,"tag":357,"props":3007,"children":3008},{"class":359,"line":378},[3009],{"type":43,"tag":357,"props":3010,"children":3011},{},[3012],{"type":48,"value":3013},"    public override string GetFieldCssClass(EditContext editContext, in FieldIdentifier fieldIdentifier)\n",{"type":43,"tag":357,"props":3015,"children":3016},{"class":359,"line":387},[3017],{"type":43,"tag":357,"props":3018,"children":3019},{},[3020],{"type":48,"value":534},{"type":43,"tag":357,"props":3022,"children":3023},{"class":359,"line":397},[3024],{"type":43,"tag":357,"props":3025,"children":3026},{},[3027],{"type":48,"value":3028},"        var isValid = !editContext.GetValidationMessages(fieldIdentifier).Any();\n",{"type":43,"tag":357,"props":3030,"children":3031},{"class":359,"line":406},[3032],{"type":43,"tag":357,"props":3033,"children":3034},{},[3035],{"type":48,"value":3036},"        return editContext.IsModified(fieldIdentifier)\n",{"type":43,"tag":357,"props":3038,"children":3039},{"class":359,"line":415},[3040],{"type":43,"tag":357,"props":3041,"children":3042},{},[3043],{"type":48,"value":3044},"            ? (isValid ? \"is-valid\" : \"is-invalid\")\n",{"type":43,"tag":357,"props":3046,"children":3047},{"class":359,"line":424},[3048],{"type":43,"tag":357,"props":3049,"children":3050},{},[3051],{"type":48,"value":3052},"            : \"\";\n",{"type":43,"tag":357,"props":3054,"children":3055},{"class":359,"line":433},[3056],{"type":43,"tag":357,"props":3057,"children":3058},{},[3059],{"type":48,"value":552},{"type":43,"tag":357,"props":3061,"children":3062},{"class":359,"line":441},[3063],{"type":43,"tag":357,"props":3064,"children":3065},{},[3066],{"type":48,"value":561},{"type":43,"tag":58,"props":3068,"children":3069},{},[3070],{"type":48,"value":3071},"Apply to the form:",{"type":43,"tag":346,"props":3073,"children":3075},{"className":653,"code":3074,"language":655,"meta":351,"style":351},"protected override void OnInitialized()\n{\n    editContext = new EditContext(model);\n    editContext.SetFieldCssClassProvider(new BootstrapFieldCssClassProvider());\n}\n",[3076],{"type":43,"tag":64,"props":3077,"children":3078},{"__ignoreMap":351},[3079,3086,3093,3100,3108],{"type":43,"tag":357,"props":3080,"children":3081},{"class":359,"line":360},[3082],{"type":43,"tag":357,"props":3083,"children":3084},{},[3085],{"type":48,"value":690},{"type":43,"tag":357,"props":3087,"children":3088},{"class":359,"line":369},[3089],{"type":43,"tag":357,"props":3090,"children":3091},{},[3092],{"type":48,"value":698},{"type":43,"tag":357,"props":3094,"children":3095},{"class":359,"line":378},[3096],{"type":43,"tag":357,"props":3097,"children":3098},{},[3099],{"type":48,"value":706},{"type":43,"tag":357,"props":3101,"children":3102},{"class":359,"line":387},[3103],{"type":43,"tag":357,"props":3104,"children":3105},{},[3106],{"type":48,"value":3107},"    editContext.SetFieldCssClassProvider(new BootstrapFieldCssClassProvider());\n",{"type":43,"tag":357,"props":3109,"children":3110},{"class":359,"line":397},[3111],{"type":43,"tag":357,"props":3112,"children":3113},{},[3114],{"type":48,"value":561},{"type":43,"tag":51,"props":3116,"children":3118},{"id":3117},"donts",[3119],{"type":48,"value":3120},"Don'ts",{"type":43,"tag":575,"props":3122,"children":3123},{},[3124,3155,3174,3198,3210,3221,3232,3257],{"type":43,"tag":579,"props":3125,"children":3126},{},[3127,3129,3134,3135,3141,3143,3148,3149,3154],{"type":48,"value":3128},"Don't use ",{"type":43,"tag":64,"props":3130,"children":3132},{"className":3131},[],[3133],{"type":48,"value":155},{"type":48,"value":329},{"type":43,"tag":64,"props":3136,"children":3138},{"className":3137},[],[3139],{"type":48,"value":3140},"@oninput",{"type":48,"value":3142}," in Static SSR forms — they require interactivity. Use ",{"type":43,"tag":64,"props":3144,"children":3146},{"className":3145},[],[3147],{"type":48,"value":147},{"type":48,"value":79},{"type":43,"tag":64,"props":3150,"children":3152},{"className":3151},[],[3153],{"type":48,"value":139},{"type":48,"value":165},{"type":43,"tag":579,"props":3156,"children":3157},{},[3158,3160,3166,3167,3172],{"type":48,"value":3159},"Don't forget ",{"type":43,"tag":64,"props":3161,"children":3163},{"className":3162},[],[3164],{"type":48,"value":3165},"Model ??= new()",{"type":48,"value":2270},{"type":43,"tag":64,"props":3168,"children":3170},{"className":3169},[],[3171],{"type":48,"value":2276},{"type":48,"value":3173}," — the model is null on GET, populated on POST.",{"type":43,"tag":579,"props":3175,"children":3176},{},[3177,3178,3183,3185,3190,3191,3196],{"type":48,"value":3128},{"type":43,"tag":64,"props":3179,"children":3181},{"className":3180},[],[3182],{"type":48,"value":822},{"type":48,"value":3184}," together with ",{"type":43,"tag":64,"props":3186,"children":3188},{"className":3187},[],[3189],{"type":48,"value":772},{"type":48,"value":856},{"type":43,"tag":64,"props":3192,"children":3194},{"className":3193},[],[3195],{"type":48,"value":800},{"type":48,"value":3197}," — they're mutually exclusive.",{"type":43,"tag":579,"props":3199,"children":3200},{},[3201,3203,3208],{"type":48,"value":3202},"Don't omit ",{"type":43,"tag":64,"props":3204,"children":3206},{"className":3205},[],[3207],{"type":48,"value":1490},{"type":48,"value":3209}," — validation attributes are silently ignored without it.",{"type":43,"tag":579,"props":3211,"children":3212},{},[3213,3214,3219],{"type":48,"value":3202},{"type":43,"tag":64,"props":3215,"children":3217},{"className":3216},[],[3218],{"type":48,"value":139},{"type":48,"value":3220}," in SSR when a page has multiple forms — both forms will fire on any submission.",{"type":43,"tag":579,"props":3222,"children":3223},{},[3224,3225,3230],{"type":48,"value":3128},{"type":43,"tag":64,"props":3226,"children":3228},{"className":3227},[],[3229],{"type":48,"value":1157},{"type":48,"value":3231}," in Static SSR — it requires an interactive render mode.",{"type":43,"tag":579,"props":3233,"children":3234},{},[3235,3237,3242,3243,3248,3250,3255],{"type":48,"value":3236},"Don't use both ",{"type":43,"tag":64,"props":3238,"children":3240},{"className":3239},[],[3241],{"type":48,"value":327},{"type":48,"value":79},{"type":43,"tag":64,"props":3244,"children":3246},{"className":3245},[],[3247],{"type":48,"value":335},{"type":48,"value":3249}," on an ",{"type":43,"tag":64,"props":3251,"children":3253},{"className":3252},[],[3254],{"type":48,"value":131},{"type":48,"value":3256}," — pick one.",{"type":43,"tag":579,"props":3258,"children":3259},{},[3260,3261,3267,3269,3274],{"type":48,"value":3159},{"type":43,"tag":64,"props":3262,"children":3264},{"className":3263},[],[3265],{"type":48,"value":3266},"\u003CAntiforgeryToken \u002F>",{"type":48,"value":3268}," in plain ",{"type":43,"tag":64,"props":3270,"children":3272},{"className":3271},[],[3273],{"type":48,"value":2452},{"type":48,"value":3275}," elements — the server rejects the POST without it.",{"type":43,"tag":3277,"props":3278,"children":3279},"style",{},[3280],{"type":48,"value":3281},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3283,"total":3443},[3284,3300,3315,3330,3348,3362,3377,3387,3399,3409,3422,3433],{"slug":3285,"name":3285,"fn":3286,"description":3287,"org":3288,"tags":3289,"stars":3297,"repoUrl":3298,"updatedAt":3299},"multithreaded-task-migration","migrate MSBuild tasks to multithreaded mode","Guide for migrating MSBuild tasks to multithreaded mode support, including compatibility red-team review. Use this when converting tasks to thread-safe versions, implementing IMultiThreadableTask, adding TaskEnvironment support, or auditing migrations for behavioral compatibility.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3290,3291,3294],{"name":13,"slug":14,"type":15},{"name":3292,"slug":3293,"type":15},"Engineering","engineering",{"name":3295,"slug":3296,"type":15},"Performance","performance",5535,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmsbuild","2026-07-22T05:37:33.965588",{"slug":3301,"name":3301,"fn":3302,"description":3303,"org":3304,"tags":3305,"stars":25,"repoUrl":26,"updatedAt":3314},"analyzing-dotnet-performance","analyze .NET code for performance anti-patterns","Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I\u002FO with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3306,3307,3310,3313],{"name":13,"slug":14,"type":15},{"name":3308,"slug":3309,"type":15},"Code Analysis","code-analysis",{"name":3311,"slug":3312,"type":15},"Debugging","debugging",{"name":3295,"slug":3296,"type":15},"2026-07-12T08:23:25.400375",{"slug":3316,"name":3316,"fn":3317,"description":3318,"org":3319,"tags":3320,"stars":25,"repoUrl":26,"updatedAt":3329},"android-tombstone-symbolication","symbolicate .NET runtime frames in Android tombstones","Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java\u002FKotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3321,3322,3325,3326],{"name":13,"slug":14,"type":15},{"name":3323,"slug":3324,"type":15},"Android","android",{"name":3311,"slug":3312,"type":15},{"name":3327,"slug":3328,"type":15},"Microsoft","microsoft","2026-07-12T08:23:21.595572",{"slug":3331,"name":3331,"fn":3332,"description":3333,"org":3334,"tags":3335,"stars":25,"repoUrl":26,"updatedAt":3347},"apple-crash-symbolication","symbolicate .NET runtime frames in crash logs","Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift\u002FObjective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3336,3337,3338,3341,3344],{"name":13,"slug":14,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3339,"slug":3340,"type":15},"iOS","ios",{"name":3342,"slug":3343,"type":15},"macOS","macos",{"name":3345,"slug":3346,"type":15},"Observability","observability","2026-07-12T08:23:20.369986",{"slug":3349,"name":3349,"fn":3350,"description":3351,"org":3352,"tags":3353,"stars":25,"repoUrl":26,"updatedAt":3361},"assertion-quality","evaluate assertion quality in test suites","Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull \u002F toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS\u002FJS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent \u002F writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns), fixing or rewriting assertions, or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3354,3355,3358],{"name":3308,"slug":3309,"type":15},{"name":3356,"slug":3357,"type":15},"QA","qa",{"name":3359,"slug":3360,"type":15},"Testing","testing","2026-07-12T08:23:51.277743",{"slug":3363,"name":3363,"fn":3364,"description":3365,"org":3366,"tags":3367,"stars":25,"repoUrl":26,"updatedAt":3376},"author-component","create and review Blazor components","Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-interop), forms and validation (use collect-user-input), prerendering issues (use support-prerendering), HTTP data fetching patterns (use fetch-and-send-data), coordinating state between unrelated components (use coordinate-components).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3368,3369,3370,3372,3373],{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"name":3371,"slug":655,"type":15},"C#",{"name":20,"slug":21,"type":15},{"name":3374,"slug":3375,"type":15},"Web Development","web-development","2026-07-15T06:03:29.216359",{"slug":3378,"name":3378,"fn":3379,"description":3380,"org":3381,"tags":3382,"stars":25,"repoUrl":26,"updatedAt":3386},"binlog-failure-analysis","analyze MSBuild binary logs","Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3383,3384,3385],{"name":3308,"slug":3309,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3327,"slug":3328,"type":15},"2026-07-12T08:21:34.637923",{"slug":3388,"name":3388,"fn":3389,"description":3390,"org":3391,"tags":3392,"stars":25,"repoUrl":26,"updatedAt":3398},"binlog-generation","generate MSBuild binary logs for diagnostics","Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding \u002Fbl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ \u002F .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3393,3396,3397],{"name":3394,"slug":3395,"type":15},"Build","build",{"name":3311,"slug":3312,"type":15},{"name":3292,"slug":3293,"type":15},"2026-07-19T05:38:19.340791",{"slug":3400,"name":3400,"fn":3401,"description":3402,"org":3403,"tags":3404,"stars":25,"repoUrl":26,"updatedAt":3408},"build-parallelism","optimize MSBuild build parallelism","Diagnose and fix under-parallelized MSBuild builds. USE WHEN a multi-project solution build is slower than expected, doesn't speed up when you add cores, pegs a single core while others idle, or you want to know why `-m` isn't helping. Note: `\u002Fmaxcpucount` default is 1 (sequential) — always pass `-m` for parallel builds. Covers finding the critical path (longest serial ProjectReference chain), graph build (`\u002Fgraph`), BuildInParallel, and solution filters (`.slnf`). DO NOT USE FOR: single-project builds, incremental issues (use incremental-build), compilation slowness inside one project (use build-perf-diagnostics), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3405,3406,3407],{"name":13,"slug":14,"type":15},{"name":3292,"slug":3293,"type":15},{"name":3295,"slug":3296,"type":15},"2026-07-19T05:38:18.364937",{"slug":3410,"name":3410,"fn":3411,"description":3412,"org":3413,"tags":3414,"stars":25,"repoUrl":26,"updatedAt":3421},"build-perf-baseline","establish and optimize build performance baselines","Establish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before\u002Fafter measurements (cold, warm, no-op scenarios), applying optimization strategies like MSBuild Server, static graph builds, artifacts output, and dependency graph trimming. Start here before diving into build-perf-diagnostics, incremental-build, or build-parallelism. DO NOT USE FOR: non-MSBuild build systems, detailed bottleneck analysis (use build-perf-diagnostics after baselining).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3415,3416,3419,3420],{"name":3292,"slug":3293,"type":15},{"name":3417,"slug":3418,"type":15},"Monitoring","monitoring",{"name":3295,"slug":3296,"type":15},{"name":3359,"slug":3360,"type":15},"2026-07-12T08:21:35.865649",{"slug":3423,"name":3423,"fn":3424,"description":3425,"org":3426,"tags":3427,"stars":25,"repoUrl":26,"updatedAt":3432},"build-perf-diagnostics","diagnose MSBuild build performance bottlenecks","Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization below 80%, excessive Copy tasks, NuGet restore running every build. Covers timeline analysis, Target\u002FTask Performance Summary interpretation, and 7 common bottleneck categories. Use after build-perf-baseline has established measurements. DO NOT USE FOR: establishing initial baselines (use build-perf-baseline first), fixing incremental build issues (use incremental-build), parallelism tuning (use build-parallelism), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3428,3429,3430,3431],{"name":13,"slug":14,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3292,"slug":3293,"type":15},{"name":3295,"slug":3296,"type":15},"2026-07-12T08:21:40.961722",{"slug":3434,"name":3434,"fn":3435,"description":3436,"org":3437,"tags":3438,"stars":25,"repoUrl":26,"updatedAt":3442},"check-bin-obj-clash","detect MSBuild output path conflicts","Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing\u002Foverwritten outputs in multi-project or multi-targeting builds where bin\u002Fobj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single-targeting project. DO NOT USE FOR: file access errors unrelated to MSBuild (OS-level locking), single-project single-TFM builds, non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3439,3440,3441],{"name":3311,"slug":3312,"type":15},{"name":3292,"slug":3293,"type":15},{"name":3356,"slug":3357,"type":15},"2026-07-19T05:38:14.336279",144,{"items":3445,"total":3494},[3446,3453,3460,3468,3474,3482,3488],{"slug":3301,"name":3301,"fn":3302,"description":3303,"org":3447,"tags":3448,"stars":25,"repoUrl":26,"updatedAt":3314},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3449,3450,3451,3452],{"name":13,"slug":14,"type":15},{"name":3308,"slug":3309,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3295,"slug":3296,"type":15},{"slug":3316,"name":3316,"fn":3317,"description":3318,"org":3454,"tags":3455,"stars":25,"repoUrl":26,"updatedAt":3329},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3456,3457,3458,3459],{"name":13,"slug":14,"type":15},{"name":3323,"slug":3324,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3327,"slug":3328,"type":15},{"slug":3331,"name":3331,"fn":3332,"description":3333,"org":3461,"tags":3462,"stars":25,"repoUrl":26,"updatedAt":3347},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3463,3464,3465,3466,3467],{"name":13,"slug":14,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3339,"slug":3340,"type":15},{"name":3342,"slug":3343,"type":15},{"name":3345,"slug":3346,"type":15},{"slug":3349,"name":3349,"fn":3350,"description":3351,"org":3469,"tags":3470,"stars":25,"repoUrl":26,"updatedAt":3361},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3471,3472,3473],{"name":3308,"slug":3309,"type":15},{"name":3356,"slug":3357,"type":15},{"name":3359,"slug":3360,"type":15},{"slug":3363,"name":3363,"fn":3364,"description":3365,"org":3475,"tags":3476,"stars":25,"repoUrl":26,"updatedAt":3376},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3477,3478,3479,3480,3481],{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"name":3371,"slug":655,"type":15},{"name":20,"slug":21,"type":15},{"name":3374,"slug":3375,"type":15},{"slug":3378,"name":3378,"fn":3379,"description":3380,"org":3483,"tags":3484,"stars":25,"repoUrl":26,"updatedAt":3386},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3485,3486,3487],{"name":3308,"slug":3309,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3327,"slug":3328,"type":15},{"slug":3388,"name":3388,"fn":3389,"description":3390,"org":3489,"tags":3490,"stars":25,"repoUrl":26,"updatedAt":3398},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3491,3492,3493],{"name":3394,"slug":3395,"type":15},{"name":3311,"slug":3312,"type":15},{"name":3292,"slug":3293,"type":15},96]