Blazor-将参数传递到自定义布局

Blazor-将参数传递到自定义布局,blazor,blazor-server-side,Blazor,Blazor Server Side,如何将参数传递到自定义布局? 单击NavLink时,自定义布局将在“MainLayout”内呈现 在“MainLayout”中,我们添加了一个“自定义布局”作为嵌套布局,我们希望从MainLayout向自定义布局传递一个参数 更新: @layout MSLayout @inherits LayoutComponentBase <section id="Content-nested"> <div> @Body </div> &l

如何将参数传递到自定义布局?

单击
NavLink
时,自定义布局将在“
MainLayout
”内呈现

在“
MainLayout
”中,我们添加了一个“自定义布局”作为嵌套布局,我们希望从
MainLayout
向自定义布局传递一个参数

更新:

@layout MSLayout
@inherits LayoutComponentBase

<section id="Content-nested">
    <div>
        @Body
    </div>
</section>
自定义布局页面:

@layout MSLayout
@inherits LayoutComponentBase

<section id="Content-nested">
    <div>
        @Body
    </div>
</section>