--- lang: ja-jp breaks: true --- # 参考資料 > コンポーネント タグ ヘルパー > https://learn.microsoft.com/ja-jp/aspnet/core/mvc/views/tag-helpers/built-in/component-tag-helper?view=aspnetcore-7.0#component-tag-helper ## Razorコンポーネント * AaaaComponent.razor ```htmlmixed= <h3>AaaaComponent</h3> @code { } ``` ## Razor Pages * Index.cshtml ```htmlembedded= @page @model IndexModel @{ ViewData["Title"] = "Home page"; } <div class="text-center"> <h1 class="display-4">Welcome</h1> <p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p> </div> <component type="typeof(AaaaComponent)" render-mode="ServerPrerendered" /> ``` :::info `component`タグを使用する。 ::: ## 実行 ![](https://hackmd.io/_uploads/Bkd2qq5sn.png)