title: Event argument value is not as expected
body: <p>I am creating a pager component and faced a problem. I simplified the code to show the problem :</p>
  <pre><code> @for (int i = 0; i &lt; 10; i++)
          {
             
                  &lt;li @onclick=&quot;() =&gt;UpdatePager(i)&quot; class=&quot;waves-effect&quot;&gt;&lt;a&gt;@(i+1)&lt;/a&gt;&lt;/li&gt;
           
          }
  @code{
  
      public void UpdatePager(int iCurPage)
      {
          Console.WriteLine(iCurPage);
      }
  
  }
  // when click on 1  console result is 10
  // when click on 2  console result is 10
  // ...
  // when click on 10  console result is 10
  </code></pre>
  <p>My expectation is when I click any of <code>li</code>s the corresponding number(<code>i</code>) should be logged in the console but what is actually happen is for all of the <code>li</code>s the number 10 ( final value of <code>i</code>) is printed.
  What is the problem and how should I pass different values for each rendered elements?</p>