ASP.NET Cheat Sheets

ASP.NET is documented here as three separate lineages — ASP.NET Web Forms, ASP.NET MVC (Razor), and ASP.NET Core (Blazor) — each with its own runtime, package set, and support status. This page spans more than one lineage; see each sub-section’s own landing page for its specific version and support-status disclaimer.

This content was generated with the assistance of AI and should be verified against the official documentation linked throughout before being relied on in production.

This section’s bibliography lists the reference material consulted while preparing these pages.

This section’s three lineages each get their own one-page, printable cheat sheet — pick the one that matches what you’re actually working in.

Lineage What’s on it Download

ASP.NET Web Forms

.aspx skeleton and directives, the page life-cycle event order, postback/ViewState essentials, the server- control catalogue, validation controls, a master page + ContentPlaceHolder, a GridView
SqlDataSource/ObjectDataSource snippet, Eval/Bind, the state-management table, @OutputCache, global.asax events, IHttpHandler/IHttpModule skeletons, a Forms-auth web.config block, and ScriptManager + UpdatePanel.

Download PDF

ASP.NET MVC (Razor)

Global.asax + App_Start layout, a controller with the main ActionResult types, conventional and attribute routes, Razor syntax essentials, layout/section/partial, the strongly typed HTML-helper set, a validated view model with DataAnnotations + ModelState, the four filter kinds and their order, BundleConfig, a Web API 2 ApiController + WebApiConfig, the OWIN Startup + Identity 2 registration, @Html.AntiForgeryToken() + [ValidateAntiForgeryToken], and an EF6 migration command block.

Download PDF

ASP.NET Core (Blazor)

The dotnet CLI, a minimal Program.cs, the middleware order, DI lifetimes, the Options pattern, a MapGroup CRUD with TypedResults + endpoint filter and built-in validation, a controller action, Razor Page PageModel, Tag Helpers, a Blazor component with @rendermode, EditForm and [PersistentState], a SignalR hub, AddDbContext with an async LINQ query and a migration command, auth + policy, UseExceptionHandler + AddProblemDetails, output caching + rate limiting + HybridCache, a WebApplicationFactory<Program> integration-test skeleton, and dotnet publish + Dockerfile.

Download PDF

For the full explanation, every option, and additional examples, see the dedicated pages in each sub-section:

ASP.NET Web Forms — full page inventory.

ASP.NET MVC (Razor) — full page inventory.

ASP.NET Core (Blazor) — full page inventory.