Blazor - Overview
C# ASP.NET offers a way to build highly interactive web UIs using C# and .NET. Blazor helps us to make the app interactive via different modes such as Static Web Apps Interactive Server ( Blazor Server ) WASM (Web Assembly) A Blazor app is based on Components with .razor extention. It is a combination of C# and HTML. Example: // Counter.razor @page "/counter" @rendermode InterativeServer <PageTitle>Counter</PageTitle> <h1>Counter</h1> <p role="status">Current count: @currentCount</p> <button class="btn btn-primary" @onclick="IncrementCount">Click me</button> @code { private int currentCount = 0; private void IncrementCount() { currentCount++; } } // PageTitle.razor <h3>@ChildContent</h3> @code { [Parameter] public RenderFragment ChildContent { get; set; } } In the above example, <PageTitle> is another component. @code block is used to write the C# code. This block will render a counter and a button to increment the counter. ...