CheckBoxList.Core
1.1.0
dotnet add package CheckBoxList.Core --version 1.1.0
NuGet\Install-Package CheckBoxList.Core -Version 1.1.0
<PackageReference Include="CheckBoxList.Core" Version="1.1.0" />
paket add CheckBoxList.Core --version 1.1.0
#r "nuget: CheckBoxList.Core, 1.1.0"
// Install CheckBoxList.Core as a Cake Addin #addin nuget:?package=CheckBoxList.Core&version=1.1.0 // Install CheckBoxList.Core as a Cake Tool #tool nuget:?package=CheckBoxList.Core&version=1.1.0
Synopsis
Creates a multiselection check box list based on the provided item source.
Code Example
Controller
public IActionResult Index()
{
List<CheckBoxItem> checkBoxItems = new List<CheckBoxItem>()
{
new CheckBoxItem(1, "Id 1: Unchecked Enabled", false, false),
new CheckBoxItem(2, "Id 2: Checked Enabled", true, false),
new CheckBoxItem(2, "Id 3: Unchecked Disabled", false, true),
new CheckBoxItem(2, "Id 4: Checked Disabled", true, true)
};
return View(checkBoxItems);
}
public IActionResult Result(List<int> selectedIds)
{
return View(selectedIds);
}
View
<check-box-list name="selectedIds" items="Model" template="Bootstrap3Basic"></check-box-list>
_ViewImports.cshtml
@addTagHelper *, CheckBoxList.Core
Style (Optional)
.checkbox {
}
label.checkbox {
}
label.checkbox > input {
}
Motivation
ASP.NET Core doesn't provide check box list tag helper which forces developers to write their own implementation. Therefore, I came with a tag helper that simplifies the developer's job so that they can focus on their domain rather creating their own.
Installation
Package Manager UI
In Solution Explorer, right-click References and choose Manage NuGet Packages.
Choose "nuget.org" as the Package source, select the Browse tab, search for CheckBoxList.Core, select that package in the list, and select Install:
Accept any license prompts.
If prompted to select a package management format, select PackageReference in the project file:
If prompted to review changes, select OK.
Package Manager Console
Select the Tools > NuGet Package Manager > Package Manager Console menu command. Once the console opens, check that the Default project drop-down list shows the project into which you want to install the package.
Enter the command Install-Package CheckBoxList.Core.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Html.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Razor.Runtime (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.