In this article, we will learn how to use Select2 jQuery plugin in ASP.NET Core. We will build a prototype application that can demonstrate various usages of this plugin. The Variants that we will cover are Simple Static Select, AJAX Select, AJAX Multi Select, Custom HTML in Select2. You can find the source code of the entire implementation here. Let’s begin.
Table of Contents
What is Select2?
What we will build?
Getting Started with Select2 jQuery plugin in ASP.NET Core
Scaffolding Customer Entity
Building a Search API Endpoint
Importing Select2 jQuery plugin via Libman
Simple Select with Static Values
Select using AJAX Call to API
Multiple Select
Advanced Select with Custom HTML
Summary
What is Select2?
Select2 is a powerful JQuery plugin that is designed to add more power to the traditional