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

Component attributes do not support complex content (mixed C# and markup)

$
0
0

I am trying to use a Razor argument and pass it into Blazor for further processing, but I get this error message "Component attributes do not support complex content (mixed C# and markup)" on the @onclick event I am trying to build on the img tag below:

<tr>            @{                for (int j = 0; j < Candidates.Length; j++)                {<th><div class="grow"><img src="/Candidates/@(Candidates[j].ToString()).jfif" alt="@Candidates[j].ToString()" @onclick="IncrementScore(@j)" /></div></th>                }            }</tr>

Any suggestions would be greatly appreciated!


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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