Skip to content

Instantly share code, notes, and snippets.

@0x414c49
Created January 3, 2020 10:53
Show Gist options
  • Save 0x414c49/8fb6254096d1bf46c2acfa950e8b1f37 to your computer and use it in GitHub Desktop.
Save 0x414c49/8fb6254096d1bf46c2acfa950e8b1f37 to your computer and use it in GitHub Desktop.
Blazor debug - 1
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
private void IncrementCount()
{
if(currentCount > 10)
currentCount = 0;
currentCount++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment