
ASP.NET is a popular framework for the .NET language. However, with the launch of ASP.NET core (initially launched as ASP.NET 5), which is a more successful framework, ASP.NET 4 got outdated. Again the time to upgrade your ASP.NET core development services has arrived as .NET Core 3.1 was released recently. In this article, you will get insights on everything that is new and updated in .NET Core 3.1 and on what you need to update in your ASP.NET software development services.
A Quick Brief Into All The New Features of ASP.NET Core
In the latest .NET Core 3.1 release, here's what you get:
- Razor components now have partial class support
- A new component tag helper is introduced
- The option to prevent the execution of default actions for events in Blazor applications
- The option to stop event propagation
- Passing parameters to top-level components
- Detailed error support
- Break changes for SameSite Cookies
- Shared queues in HttpSysServer
These were all the major updates in the latest .Net Core release. However, to focus on your ASP.NET Core Development Services, you might find the information given below to be very helpful.
Razor Components Partial Class Support
Now, in .NET Core, you can generate Razor components as partial classes. There's no need for you to define the entire Razor component code for the component in a single file and can write it using a partial class.
The New Component Tag Helper
Earlier in ASP.NET Core 3.0, developers were required to render Blazer components into pages and views using the HTML helper. However, in ASP.NET Core 3.1, pages and views can render a component using the latest Component Tag Helper. The HTML helper is also present in the new update.
The code for this will look like:
Passing Parameters To Top-Level Components
Using the Blazor Server apps, you can now pass parameters to top-level components, which is possible in the initial render. Earlier, developers had to use RenderMode.Static to do so but now, RenderMode.Server and RenderModel.ServerPrerendered are also supported. Check the Razor code below to apprehend.
Break changes for SameSite Cookies
To favor the upcoming browser changes, the behavior of SameSite cookies has been addressed. It might not affect much but will show a difference during authentication like OpenIdConnect, WsFerderation, and AzureAD.
Prevent the execution of default actions for events in Blazor applications
You also need to fine-tune your ASP.NET Core development services to make the best use of this feature. By using the @on{EVENT}:preventDefault attribute, you can prevent the default action for an event. A simple example is given below.
Shared queues in HttpSysServer
In ASP.NET Core 3.0, you can create an anonymous request queue using HTTP.sys. In the latest update, .NET developers also get the option to attach to an already named HTTP.sys request queue. It will make the HTTP.sys controller process independent of the listener process.
Stop Event Propagation in Blazor
Along with the option to stop default event actions, you can also stop event propagation in the latest update. To do so, you are required to use the @on{EVENT}:stopPropagation directive attribute.
Get Detailed Errors While Developing Blazor Apps
The latest ASP.NET Core framework can provide you with detailed error information so that you can resolve it much easier than before. This way, troubleshooting bugs and issues when a Blazor app is functioning properly is made simple. Whenever an error will occur, you will be notified with a gold bar at the bottom of the screen.
- If you are developing the application, the gold bar will take you to the browser console where the exception has occurred.
- During production, the gold bar can notify ASP.NET core development services of the errors and suggest them to refresh the browser.
At Kindlebit Solutions, the most skilled .NET developers look over your project and provide you the most robust software solutions. For any ASP.NET software development work, you can refer to us any time and we will complete your project in any given timeframe. Our developers are available to work on a 40-50 hours per week basis. For any queries or doubts, feel free to contact us anytime. You can also explore our website to find more helpful info.