title: Blazor how to pass arguments to onclick function?
body: <p>I'd want to make button <code>onclick</code> function that takes some input.</p>
  
  <pre><code>&lt;button onclick="@test(123, 456)"&gt;Check&lt;/button&gt;
  
  @functions
  {
      public void test(int a, int b)
      {
          Console.WriteLine(a + b);
      }
  }
  </code></pre>
  
  <p>But for some reason it throws an error:</p>
  
  <p><code>Argument "1": Cannot convert from void to string</code></p>
  
  <p>Later I'd want to create those buttons in for loop like</p>
  
  <pre><code>@for (int i = 0; i &lt; 10; i++)
  {
      &lt;button onclick="@test(i, 5 * i)"&gt;Check&lt;/button&gt;
  }
  </code></pre>
  
  <p>How can I achieve that?</p>