Cannot supply a component of type 'Components.BookComponent' because the current platform does not support the render mode 'Microsoft.AspNetCore.Components.Web.InteractiveServerRenderMode'

Mahdi Elahi 31 Reputation points
2024-05-15T07:54:39.42+00:00

when i call component by this way i have this error

in TestComponent.razor i call BookComponent to get html
var sensorHtml = new ComponentRenderer<WeaponDetails>() .Render();

BookComponent.razor

@rendermode InteractiveServer
other codes......

but i have this error

Cannot supply a component of type 'Components.BookComponent' because the current platform does not support the render mode 'Microsoft.AspNetCore.Components.Web.InteractiveServerRenderMode'

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,595 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.