The click-event is not working. I don't know why.
In a foreach I create a String:
html += $"<div style='padding: 5px;' @onclick='() => TerminClick({term.Sinr})'>";{date}</div>";
and put it into a MarkupString object:
_terminContent = new MarkupString(html);
At the html I implement the content:
@_terminContent
I got the method TerminClick(int id)
public void TerminClick(int id)
{
logger.LogWarning($"Termin: {id}");
}
At Chrome Dev Tools I check the code:

I tried also without parameter {term.Sinr} respectively int id and that also is not working. I set a breakpoint into TerminClick() it's never hit and also at the console logger.LogWarning(..) is never logged.
I tried also using @onclick="@TerminClick(..)".
How do I get the click event working using a MarkupString?