ASP.NET Core

12345678910...Last
Create minimal APIs using ASP.NET Core 6 and Visual Studio 2022
One of the features of ASP.NET Core 6 that has got much attention is minimal APIs. You can now create API endpoints without creating a controller and routing related configuration. I have already discussed creation of minimal APIs in a few articles published earlier. The earlier articles were published during the Preview days of ASP.NET Core 6 and use Visual Studio 2019. Now that the final versions of ASP.NET Core 6 and Visual Studio 2022 are available, it's time to revisit the subject and look into various aspects of minimal APIs in more details. To that end this multipart article series is going to discuss just that.
Posted On : 25 Nov 2021
Your first app using ASP.NET Core 6 and Visual Studio 2022
If you are keeping an eye on the progress of ASP.NET Core 6 you are probably aware that .NET 6, C# 10, and Visual Studio 2022 have been released. There are lots of new things, small to big, added to the overall .NET family and I have discussed a few of them in my previous articles. In this article I will show you how to create your first web application in Visual Studio 2022. I assume that you are already familiar with Visual Studio 2019 and ASP.NET Core in general. This is going to be a quick introduction to give you a feel of the new IDE and project structure.
Posted On : 11 Nov 2021
Show modal and non-modal dialogs in ASP.NET Core MVC and Blazor
Many web apps accept user input through dialog boxes. There are multiple options when it comes to displaying a dialog box to the user. You can resort to plain JavaScript or you can use some plug-in to accomplish the task. However, in this article I am going to show a lesser known technique of displaying dialog boxes. The HTML element can be used to display modal and non-modal dialog boxes.
Posted On : 03 Nov 2021
Create Templated Components in Blazor
A Blazor application consists of one or more Razpr Components. Typically a component houses its UI in the form of HTML markup and the associated logic. However, at times you want the parent component to specify fragments of the UI so that these fragments can be rendered to produce the final UI of your component. These fragments of UI are called templates. If you ever worked with ASP.NET Web Form's data bound controls such as GridView, ListView, and DataList you are already familiar with the idea of templates and templated controls. Luckily, you can easily create templated components in Blazor so that your component becomes more reusable and customizable.
Posted On : 01 Sep 2021
Drag-n-Drop file upload in Blazor using JS interop and minimal API (Part 2)
In the Part 1 of this article you learned to implement drag-n-drop in a Blazor Server application. So far we are able to drag-n-drop files on to a drop target and list those file names in the fileBasket. However, no files are actually sent to the server. That's what we will do in this part of the article. Although our focus is going to be minimal API approach, we will explorer three variations of the process.
Posted On : 27 Aug 2021
Drag-n-Drop file upload in Blazor using JS interop and minimal API (Part 1)
Uploading files from client computer to the server is a common task in web applications. You can either use jQuery Ajax or Blazor's InputFile component to accomplish that task. Files to be uploaded on the server are typically selected by the end user using file input field. However, most of the browsers also allow you to select files by dragging them from the client computer to your web application. To that end this article discusses how drag-n-drop of files can be done in Blazor Server apps. I am going to assume that you are familiar with Blazor's JavaScript interop. You may read my previous article in case you aren't familiar with Blazor's JS interop.
Posted On : 18 Aug 2021
Use JavaScript Interop in Blazor
ASP.NET Core Blazor allows you build SPAs using C#, HTML, and CSS. Although you can develop Blazor apps without using any JavaScript, at times you might want to invoke some JavaScript code from your Blazor components. Moreover, the JavaScript code might also want to invoke some C# methods. To that end this article quickly illustrates how this can be accomplished using Blazor's JavaScript interop features.
Posted On : 04 Aug 2021
Load components dynamically in Blazor
Blazor apps consist of one or more Razor components that reside in .razor files. Usually, you place a component in a page at development time. However, at times you may want to load components on the fly based on some logic. That means you don't know the component to be loaded at the development time. That will be known only during run-time. Luckily, Blazor provides what is known as Dynamic Component that can be used to deal with such situation. In this article you will learn how Dynamic Component can be used in a Blazor Server app.
Posted On : 26 Jul 2021
Create your own .NET CLI tool
As a ASP.NET Core developer you are familiar with .NET Command Line Interface (CLI). You must have also used CLI tools such as dotnet-ef while building ASP.NET Core web apps. In addition to using built-in CLI tools you can create your own tools that can be used with .NET CLI. To this end this article introduces you to the overall tool creation and registration process.
Posted On : 05 Jul 2021
Minimal APIs in ASP.NET Core 6
ASP.NET Core 6 has introduced minimal APIs that provide a new way to configure application startup and routing a request to a function. In my previous article I covered the new way of configuring application startup. In this article we will see how the new routing APIs can be used to map HTTP verbs to a function.
Posted On : 14 Jun 2021
12345678910...Last