📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

Blazor

Building UIs with Blazor in .NET 10: Blazor Web App render modes, Server and WebAssembly, components and lifecycle, routing, forms and validation, JavaScript interop and state management.

  1. What are the render modes in a Blazor Web App in .NET 10? Explain static server-side rendering, Interactive Server, Interactive WebAssembly and Interactive Auto, where the code actually runs in each, and how you would choose between them.

    Covers the four Blazor Web App render modes (static SSR, Interactive Server, Interactive WebAssembly, Interactive Auto), where code runs, prerendering, how modes are applied, and the trade-offs that drive the choice.

    Junior Theory Blazor Β· πŸ”— 3 follow-ups
  2. Walk me through how a Blazor component works. How do parameters, EventCallback and cascading parameters pass data, what is the order of the lifecycle methods, when does a component re-render, and when do you need to call StateHasChanged yourself?

    Covers Blazor component parameters, EventCallback, ChildContent and cascading parameters, the lifecycle order (SetParametersAsync, OnInitialized, OnParametersSet, OnAfterRender, Dispose), the render cycle and when StateHasChanged is needed.

    Intermediate Theory Blazor Β· πŸ”— 2 follow-ups
  3. Show me how you build a form with validation in Blazor in .NET 10. Use EditForm with DataAnnotations, add a custom rule, validate nested objects, submit to an ASP.NET Core API and show the server's validation errors next to the right fields. How does it differ when the form is rendered with static SSR?

    Covers Blazor EditForm and EditContext, DataAnnotationsValidator, input components, custom validation attributes, .NET 10 nested validation, mapping ProblemDetails errors with ValidationMessageStore, and SSR forms with FormName, SupplyParameterFromForm and antiforgery.

    Intermediate Coding Blazor Β· πŸ”— 3 follow-ups
  4. How do routing and navigation work in Blazor? Explain @page route templates and constraints, the Router component, NavigationManager and query-string parameters, how to stop users losing unsaved changes, and what enhanced navigation does in a Blazor Web App compared with interactive client-side routing.

    Covers Blazor routing (@page templates, constraints, catch-all, Router and NotFoundPage), NavigationManager (NavigateTo, NotFound, LocationChanged), SupplyParameterFromQuery, NavigationLock, and enhanced navigation versus interactive routing in .NET 10 Blazor Web Apps.

    Mid-Level Theory Blazor Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  5. Show me how JavaScript interop works in Blazor. How do you call a JavaScript module from .NET and call .NET from JavaScript, why must interop wait until after the first render, how do you avoid memory leaks with DotNetObjectReference and IJSObjectReference, and what changes between Server and WebAssembly?

    Covers Blazor JS interop with IJSRuntime, collocated JS modules and IJSObjectReference, JSInvokable and DotNetObjectReference callbacks, ElementReference, OnAfterRenderAsync and prerendering, disposal and JSDisconnectedException, and Server vs WebAssembly differences.

    Mid-Level Coding Blazor Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  6. How do you manage state in a Blazor Web App? Explain component state, cascading values, scoped services and what 'scoped' means per circuit versus per request, browser storage, and how .NET 10 persists state across prerendering, enhanced navigation and lost circuits. What must never go in a singleton?

    Covers Blazor state: component fields, cascading values (including root-level AddCascadingValue), scoped state services per circuit or per WASM app, URL and browser storage (ProtectedSessionStorage), [PersistentState] for prerendering and enhanced navigation, circuit state persistence in .NET 10, and the singleton data-leak risk.

    Mid-Level Theory Blazor Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  7. Your Blazor Server app works well in testing, but on Monday morning with about 2,000 users it slows down, memory climbs, users see 'Attempting to reconnect' and some lose their work. How do you diagnose it? Cover circuits and memory per user, WebSockets and sticky sessions, SignalR limits and Azure SignalR Service, and what you change in the app.

    Covers diagnosing Blazor Server under load: circuit memory and leaks, scoped DbContext, blocking calls, WebSockets and long polling, sticky sessions, circuit options and SignalR limits, Azure SignalR Service, .NET 10 circuit metrics, and moving pages to static SSR or WebAssembly.

    Senior Debugging Blazor Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me