News

What's New for Blazor and ASP.NET Core in .NET Core 3.1 Preview 2

While the ASP.NET Core team primarily focused on bug fixes in the new .NET Core 3.1 Preview 2, there was a smattering of new functionality introduced in the webdev component.

Here's a rundown of those new features in ASP.NET Core, which includes Blazor to enable .NET-centric Web developers to use C# instead of JavaScript, thanks to WebAssembly.

  • New component tag helper: This is said to ease the use of Razor components from views and pages, which previously required rendering a component from a view or page using the RenderComponentAsync HTML helper. "The new component tag helper simplifies the syntax for rendering components from pages and views. Simply specify the type of the component you wish to render as well as the desired render mode. You can also specify component parameters using attributes prefixed with param-."
  • Prevent default actions for events in Blazor apps: "You can now prevent the default action for events in Blazor apps using the new @oneventname:preventDefault directive attribute."
  • Stop event propagation in Blazor apps: "Use the new @oneventname:stopPropagation directive attribute to stop event propagation in Blazor apps."
  • Validation of nested models in Blazor forms: This experimental feature, presented for early developer feedback rather than inclusion in .NET Core 3.1, improves on the existing built-in DataAnnotationsValidator used to validate form input using data annotations. It can only validate top-level properties of a model bound to a form. "To validate the entire object graph of the bound model, try out the new ObjectGraphDataAnnotationsValidator available in the experimental Microsoft.AspNetCore.Blazor.DataAnnotations.Validation package."
  • Detailed errors during Blazor app development: This helps developers get detailed error information in order to troubleshoot and fix issues. "Blazor apps now display a gold bar at the bottom of the screen when an error occurs. During development, in Blazor Server apps, the gold bar will direct you to the browser console where you can see the exception that has occurred."

All of the above and more is detailed in an announcement post published by program manager Daniel Roth during Microsoft's Ignite conference. More information can be found in the release notes and the GitHub project. Our coverage of the .NET Core 3.1 Preview 2 release also announced today can be found here.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube