Skip to content

Blazor WebAsm + bootstrap rendering issue if part of the table is generated dynamically. #64217

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version]
The project is a .NET 8 Blazor WebAssembly. If a razor page/component contains a table that is styled via bootstrap css classes and some of the table content is created dynamically from @Property, the bootstrap styling is not applied. If the whole table is embedded in the razor page via @Property, the styling is applied correctly.

What does not work:

<table class="table table-striped"><tr><td>@Property</td></tr></table>
@code {
    public static string Property => "test";
}

What does work:

@Property
@code {
    public static MarkUpString Property
        => new ("<table class=\"table table-striped\"><tr><td>test</td></tr></table>")
}

While investigating this issue, I've created a sample project that illustrates the problem,
on branch Blazor_WebAsm_Rendering_And_Table_Styling_Issue of the github repository. The issue is still present after upgrading the project to .NET 9. The sample project seems to indicate that the issue is not the final HTML that is produced, but the way the new elements are integrated into the DOM.

This is a blocking issue for using styled tables with dynamic content in out-of-the-box Blazor.


Original Comments

Feedback Bot on 10/31/2025, 01:56 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions