Skip to content

Instantly share code, notes, and snippets.

@aramkoukia
Created June 16, 2018 19:36
Show Gist options
  • Save aramkoukia/08e0fac64e0f867a906859188f7f0c4a to your computer and use it in GitHub Desktop.
Save aramkoukia/08e0fac64e0f867a906859188f7f0c4a to your computer and use it in GitHub Desktop.
counter Blazor code sample
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button class="btn btn-primary" onclick="@IncrementCount">Click me</button>
@functions {
int currentCount = 0;
void IncrementCount()
{
currentCount++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment