How To
Using HTML Range Inputs with ASP.NET Core TagHelpers
By Tan Lee Published on Feb 27, 2025 149
HTML offers a variety of input fields that can significantly enhance user experiences. As of this writing, there are 22 HTML input types, and the InputTagHelper in ASP.NET Core supports 14 of them, based on .NET common language runtime types in your models.
Using HTML DataList with ASP.NET Core
By Tan Lee Published on Feb 27, 2025 267
In this post, I'll explain what a datalist is and why it might be beneficial to use in your ASP.NET Core applications, then we'll implement tag helpers to make the integration of the datalist element easier for your ASP.NET Core MVC and Razor Page applications.
Action and Func Delegates in C#
By Tan Lee Published on Feb 27, 2025 112
Delegates in C# are a powerful feature found in the System.Delegate namespace. They serve various purposes, but the most common ones are:
Override Function in C#
By Tan Lee Published on Feb 27, 2025 129
In C#, the override keyword is used to modify or extend the functionality of a method that is defined in a base class. This mechanism allows derived classes to implement their own version of a method, while preserving the base class's interface.
How to Convert a DataTable to a List of Objects in C#
By Tan Lee Published on Feb 27, 2025 471
To easily convert a DataTable to a list of objects in C#, we can create a generic method that utilizes the power of JSON serialization and deserialization.
What does 'use strict;' means in Javascript
By Tan Lee Published on Feb 27, 2025 140
"Use strict;" is a directive in JavaScript that enforces stricter parsing and error handling on the code. When you apply strict mode, the interpreter enforces stricter rules, catching common coding mistakes and preventing certain problematic or error-prone syntax.
How to detect if caps lock is pressed in Javascript
By Tan Lee Published on Feb 27, 2025 128
Unfortunately, JavaScript doesn't have a direct way to detect if the Caps Lock key itself is pressed
How to create a Custom Event in Javascript
By Tan Lee Published on Feb 27, 2025 136
Creating a custom event in JavaScript involves two main steps: defining the event and dispatching it. The CustomEvent API is used to create custom events that can be listened to and responded to in the same way as built-in events.
How to Check if an Object Has a Property Properly in JavaScript
By Tan Lee Published on Feb 27, 2025 130
When working with objects in JavaScript, it's common to check if a property exists before attempting to use it.
How to convert an Uint8Array to string in Javascript
By Tan Lee Published on Feb 27, 2025 169
To convert a Uint8Array to a string in JavaScript, you can use several methods depending on the environment (e.g., browser or Node.js) and the size of the data.
How to copy text to clipboard in Javascript
By Tan Lee Published on Feb 27, 2025 236
To copy text to the clipboard in JavaScript, you can use the following methods.
How to Use Conditional Middleware in ASP.NET Core
By Tan Lee Published on Feb 26, 2025 211
ASP.NET Core is a powerful, cross-platform framework designed by Microsoft for building high-performance web applications. It is lightweight and modular, allowing developers to configure middleware components that define how HTTP requests and responses are processed.