<tr onclick="@(() => Show(item.StudentId))"> This piece of code gives me errors: I tried to change it to: <tr @onclick="() => Show(item.StudentId))"> but that still does not work.