在program.cs中添加
builder.Services.AddServerSideBlazor(); app.MapBlazorHub();
///Index.cshtml @(await Html.RenderComponentAsync<blazor控件>(RenderMode.Server))
页面添加blazor控件。