Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

C# Blazor .NET 8: Can't use @typeparam and @rendermode at the same time?

$
0
0

I would like to know, how it is possible to use a @typeparam while also using @rendermode InteractiveServer.

I get an error

Error CS0305
Using the generic type 'ManageList' requires 1 type arguments
Web C:\src\ilink\ilink-api\Web\Web\Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Components_List_ManageList_razor.g.cs 124 Active

As soon as I remove the @rendermode, everything works fine, whether I'm calling the component or not.

This doesn't compile:

@typeparam T@rendermode InteractiveServer<h3>Test</h3>@code {}

But this does:

@typeparam T<h3>Test</h3>@code {}

I tried removing the @rendermode, and this fixes the issue. But I can't manage a way to use both at the same time.

Thanks


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>