Creating Static Images in Blazor: A Complete Guide

Blazor is a popular web framework that allows developers to create web applications using C# instead of JavaScript. It provides a simple, elegant, and efficient way to build client-side applications that run in any modern web browser. In this article, we will be exploring the creation of static images in Blazor. We will cover the… Continue reading Creating Static Images in Blazor: A Complete Guide

The Ultimate Guide to Blazor Forms and Validation 

This blog will explain how to implement Forms and Validation in Blazor. The EditForm component aids in the validation of webforms and data annotations. Let’s look at how the EditForm component handles data annotation validation. Consider the Student class file below. All of the class properties are marked with the [Required] attribute in this case.… Continue reading The Ultimate Guide to Blazor Forms and Validation 

Developer Exception Page in ASP.NET Core

The developer exception page is a one of the error handling processes in ASP.Net Core. It will give you complete details about the exception. To enable the Developer exception page app.UseDeveloperExceptionPage(); should be added in Configure method in Startup.cs file. The  app.UseDeveloperExceptionPage(); must appear before the middleware  which needs to handle the exception. public void… Continue reading Developer Exception Page in ASP.NET Core

Basic Event Handling in Blazor

This article is to explain how event handling works in Blazor. The @on{event} attribute in Razor is the event handling attribute. The {event} may be any event. For example, For button @onclick is a click event. In checkbox @onchange is a change event it will trigger, when checking or unchecking the checkbox. The following is… Continue reading Basic Event Handling in Blazor

Turn on CircuitOption.DetailedError in Blazor

This article is going to explain how to enable CircuitOption.DetailedError in the development environment. Let us look at a small example. The following is the Blazor component code. It contains both HTML and @code block. GetArray() method is defined in the @code module. In it, the array is initialized with four elements.  Finally, arr [5]… Continue reading Turn on CircuitOption.DetailedError in Blazor

ASP.NET Core Service Scope

Singleton vs Scoped vs Transient This article describes the service scope in ASP.NET Core and the difference between AddSingleton, AddScoped and AddTransient  methods. Let us see the following example that shows the lifetime of the services The following is an interface. This interface only returns a string unique ID (GuidID). IRepository.cs public interface IRepository {… Continue reading ASP.NET Core Service Scope

Service Injection into View in ASP.NET Core

This blog is about how dependency is injected directly into view. Let us look at it using a small example. The following is a ColorListService class that returns a list of strings. Note Put all your services in a separate folder called Services. So this will help you maintain a project structure ColorListService.cs public class… Continue reading Service Injection into View in ASP.NET Core

Group DropDownList Options in ASP.NET Core

This blog explains how to group options in a DropDownList in ASP.NET Core. Let’s look at it with an example. This example is going to bind the list of movie names grouped by the release year with the Selected Tag Helper. The following is the MyViewModelSample class. It has two properties, SelectedMovieID and MoviesList. The… Continue reading Group DropDownList Options in ASP.NET Core