Ticu Ionut
Ticu Ionut

Reputation: 81

Blazor .NET 8 preview 7 rendering modes

In Blazor on .NET 7 in server mode, I could choose between:

In both these render modes, the page will be interactive for example the counter button will increase the value.

But in .NET 8, I am not able to switch between the two.

If I remove the @attribute [RenderModeServer], the counter button will not increase the value it looks like a static page the equivalent of RenderMode.Static.

If I add @attribute [RenderModeServer], then the page will become interactive, but again the component is rendered twice which is not what I want.

How can I choose the RenderMode.Server (not Prerendered) in Blazor on .NET 8 ?

Upvotes: 2

Views: 1905

Answers (1)

Ruikai Feng
Ruikai Feng

Reputation: 11896

Here's an article related

You may try

@attribute [RenderModeServer(false)]

enter image description here

Upvotes: 1

Related Questions