Start Debugging

Daily notes on .NET, C#, EF Core, MAUI, Blazor, and Flutter - for developers who ship.

How to download a file from a Blazor component without JavaScript interop
Skip the downloadFileFromStream JS module entirely. Render an anchor with the download attribute pointing at a minimal API endpoint that returns TypedResults.File, or POST a plain HTML form with an AntiforgeryToken. Covers why the download attribute is what stops Blazor's enhanced navigation from swallowing the click, why data-enhance silently discards the file, and the cookie-vs-bearer auth trap.
Page 1 of 75 Next ›