⚙️

Backend Technologies · .NET

Blazor — Free Learning Resources

Free, printable resources for Blazor — practice problems, quick-reference cheatsheet, and an interview prep sheet. No sign-up required.

📝Practice Worksheet

BlazorPractice Worksheet

Structured exercises and problems to build hands-on Blazor skills. Work through key concepts step by step.

📋Cheatsheet

BlazorCheatsheet

One-page quick-reference for Blazor — key syntax, commands, patterns, and best practices at a glance.

🎯Interview Sheet

BlazorInterview Sheet

Top Blazor interview questions with concise answers. Get ready for any technical round with this focused prep sheet.

About Blazor

Blazor is Microsoft's framework for building interactive web UIs with C# instead of JavaScript. Blazor Server runs components on the server over a SignalR connection; Blazor WebAssembly runs the .NET runtime directly in the browser. Both let .NET developers build rich SPAs and interactive pages without switching languages.

BlazorCheat Sheet — What's Covered

  • Component model — @code blocks, parameters, cascading values, and event callbacks
  • Blazor Server vs. WebAssembly vs. Hybrid — tradeoffs and use cases
  • Data binding — @bind, two-way binding, and @onchange
  • Dependency injection in Blazor — @inject and service lifetimes
  • JavaScript interop — IJSRuntime.InvokeAsync and calling .NET from JS

Frequently Asked Questions — Blazor

What is the difference between Blazor Server and Blazor WebAssembly?

Blazor Server runs C# on the server; UI events are sent over SignalR and DOM updates are pushed back. Blazor WASM downloads the .NET runtime to the browser and runs entirely client-side. Server is faster to start, WASM works offline. Blazor Hybrid embeds both for desktop/mobile apps.

How does Blazor's component model work?

Components are .razor files combining HTML markup with a @code { } block. Parameters are public properties with [Parameter] attribute. Child components receive values via parameter attributes. EventCallback<T> enables child-to-parent communication.

How does dependency injection work in Blazor?

Register services in Program.cs: builder.Services.AddScoped<IMyService, MyService>(). Inject in components with @inject IMyService MyService or in code-behind with [Inject] attribute. Blazor Server uses Scoped per-circuit; WASM uses Scoped per-app-lifetime.

How do you call JavaScript from Blazor?

Inject IJSRuntime and call await JSRuntime.InvokeAsync<string>('functionName', args). Define the JS function in wwwroot. Use ValueTask overloads to avoid unnecessary async overhead. IJSObjectReference handles JS module imports. Call .NET from JS via DotNet.invokeMethodAsync.

What are the performance implications of Blazor Server?

Blazor Server requires a persistent SignalR connection per user — every UI interaction roundtrips to the server. This limits scalability under high concurrent user loads. Use static rendering and streaming for read-heavy pages, and only Blazor interactive components where real interactivity is needed.

Who Is This For?

.NET developers who want to build interactive web UIs without JavaScript, reusing existing C# skills, libraries, and server-side logic.

Resource Details

FormatPDF, Printable
Cheat Sheet1 page, landscape
Interview Sheet10 questions + answer lines
Practice Sheet10 Q&A pairs with answers
PriceFree
Back to Blazor