Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions blazor/sidebar/how-to/sidebar-in-the-dotnet8-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ documentation: ug

Integrate the Blazor Sidebar component into the `MainLayout.razor` page of the .NET 8 application. Next, include the `@rendermode InteractiveServer` directive in the `Routes.razor` page of the application. When you specify InteractiveServer as the render mode for the Routes component, you are enabling interactive server-side rendering (SSR) for your entire Blazor application.

```cshtml
N> Add the following code in the `MainLayout.razor` file. The `@Body` property is available only in layout components. If the code is copied into a page such as `Index.razor` or `Home.razor`, the application will throw the compiler error: `CS0103: The name 'Body' does not exist in the current context`.

{% tabs %}
{% highlight razor tabtitle="MainLayout.razor" %}

@using Syncfusion.Blazor.Navigations
@using Syncfusion.Blazor.Inputs
Expand Down Expand Up @@ -167,14 +170,15 @@ Integrate the Blazor Sidebar component into the `MainLayout.razor` page of the .

</style>

```

```cshtml
{% endhighlight %}
{% endtabs %}

<--Add it in Router.razor--->
{% tabs %}
{% highlight razor tabtitle="Routes.razor" %}

@rendermode InteractiveServer

<!-- Other codes -->

```
{% endhighlight %}
{% endtabs %}