title: Is there a way that I can allow a incrementing counter to display a image on the index page when even and another when false. In the body is my try
body: <p>@page &quot;/counter&quot;</p>
  <h1>Counter</h1>
  <p>Current count: @currentCount</p>
  <p>&lt;button class=&quot;btn btn-primary&quot; @onclick=&quot;IncrementCount&quot;&gt;Click me</p>
  <p>@code {
  private int currentCount = 0;</p>
  <pre><code>private void IncrementCount()
  {
      currentCount++;
      if (currentCount % 2 == 0)
      {
          &lt;img src=&quot;~/Images/black_atlasian_mode copy.png&quot; /&gt;
      }
      else
      {
          &lt;img src=&quot;~/Images/teal_atlasian_mode copy.png&quot; /&gt;
      }
  }
  </code></pre>
  <p>}</p>