Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
What's New in MVC and Razor Pages from .NET 8 to .NET 11
With .NET 8 and 9 support ending on November 10, 2026, the target for MVC and Razor Pages apps is .NET 10. Running one project on net8.0 and net10.0, we show cookie auth returning 401 instead of 302 for API endpoints, the Minimal API form binding change, the ASP0026 warning and RazorComponentResult, plus .NET 11's MVC items and an upgrade checklist.
Razor Pages with htmx: Interactive UI Without an SPA, Partial Responses and Antiforgery
With htmx, Razor Pages handlers return the full page or just a partial depending on the HX-Request header; live search, infinite scroll and inline editing work without JSON or an SPA. We carry the antiforgery token with hx-headers and show the Vary and history restore pitfalls, htmx 2's 4xx behavior and htmx 4 differences with real requests.
Localization in MVC and Razor Pages: IStringLocalizer, IViewLocalizer, Request Culture and the Turkish "i" Pitfall
UseRequestLocalization picks a culture per request from the query string, cookie, Accept-Language or the URL; .resx files, IViewLocalizer and DataAnnotations messages are translated with it. We make Bookstore's catalog TR/EN and show the tr vs tr-TR gap, 25,5 becoming 255 in the query string, the "C" format and the Turkish i pitfall with real output.
Razor Pages: PageModel, Handler Methods, Page Routing and When to Use It Instead of MVC
With @page a Razor file becomes an endpoint, and PageModel handlers such as OnGetAsync and OnPostDeleteAsync replace actions. We rewrite Bookstore's admin CRUD and examine SupportsGet, TempData, AuthorizeFolder and page filters, why an unmatched handler ends in a 500, and the file layout versus MVC, with real output.
When Server-Side Rendering? Choosing Between MVC, Razor Pages, Blazor SSR and an Angular SPA
Server-side rendering wins for SEO, fast first loads, form-heavy internal apps and small teams; an SPA fits heavy interactivity and APIs with many clients. We build the same list with an MVC controller and a Razor Page, trace the request lifecycle in the framework logs, compare a 474-byte Angular shell with 2.5 KB of ready HTML and discuss where Blazor SSR fits.