Skip to content

option element use checked on docs instead of selected #38235

Todo

Description

@Bartmax

Description

checked is not a valid attribute for <option/>

<option checked="@(Model!.Classification == "Exploration")" 
                    value="Exploration">
                    Exploration
                </option>

also check this this issue because the correct doc won't work properly either.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/input-components?view=aspnetcore-11.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/forms/input-components.md

Document ID

52ee411b-69fe-c0bc-5305-846d9384ebbd

Platform Id

ebc8ed08-0e4e-884d-e47b-d27b203d1205

Article author

@guardrex

Metadata

  • ID: 52ee411b-69fe-c0bc-5305-846d9384ebbd
  • PlatformId: ebc8ed08-0e4e-884d-e47b-d27b203d1205
  • Service: aspnet-core
  • Sub-service: blazor

Related Issues

Activity

  1. added
    Source - Docs.ms
    on Nov 30, 2026
  2. github-actions commented on Nov 30, 2026

    @github-actions
    Contributor

    👋 Thanks for your issue! 😊

    Stand-by! A green dinosaur 🦖 will be along shortly to assist.

  3. guardrex commented on Dec 1, 2026

    @guardrex
    Collaborator

    Hello @Bartmax! Great to hear from you! I hope you're well.

    Thanks for sending this in. I'll fix it on the sample repo first, and then I'll make adjustments here.

    WRT the engineering issue and framework bug fix, I think we'll just remove the attribute assignment completely. I don't think it's necessary for these examples, given that the model binding will take care of the correct selected option assignment. I'll ping you on the samples repo PR shortly.

  4. moved this from Triage to In progress in Blazor.Docson Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Pri1Source - Docs.msaspnet-core/svcblazor/subsvcdoc-bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions