cked because the &lt;code&gt;onclick&lt;/code&gt; event was cancelled using &lt;code&gt;@onclick:preventDefault&lt;/code&gt;.&lt;/span&gt;
    }
    else
    {
        &lt;span&gt;Click the checkbox&lt;/span&gt;
    }
&lt;/label&gt;

@code {
    private bool showMessage = false;
}</pre>
<div class="ratio ratio-16x9"><iframe src="https://www.youtube.com/embed/2F8MwHBy0mQ?si=KfWOMxsbHQ3pmaxR" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyrosco