Skip to content

Instantly share code, notes, and snippets.

@danielplawgo
Created March 17, 2019 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielplawgo/e031d43110d41e7f0b8593b4ac381f6a to your computer and use it in GitHub Desktop.
Save danielplawgo/e031d43110d41e7f0b8593b4ac381f6a to your computer and use it in GitHub Desktop.
Blazor - frontend w C#
@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