TagHelpers
This part contains number of tag-helpers that could be used in many different situations.
Contents
AnchorMatchTagHelper - add needed css-classes to target anchor depending on current url;
AppendClassTagHelper - add needed css-classes to target element dynamically regarding provided condition;
PageInfoTagHelper - organize info-text about items lists pagination;
PageSizeTagHelper - create dropdown with possible number of pages on list;
PaginationTagHelper - create pagination controls simply;
SortTagHelper - organize items list sorting;
TagHelperOutputExtensions - some extension methods for
TagHelperOutput
class.
AnchorMatchTagHelper
An AnchorTagHelper
implementation that adds CSS class to target <a>
element when current Area, Controller and Action RouteData
values correspond to specified ones.
Each of links above will be highlighted by adding active
css class only when user currently located on corresponding page (which means required area, controller and action).
AppendClassTagHelper
A TagHelper
implementation that adds CSS class to target element when "asp-append-if" is set to true
.
PageInfoTagHelper
A TagHelper
implementation allowing to organize info-text about pagination in a simple manner.
The PageInfoOptions
are:
After rendering it will give:
PageSizeTagHelper
A TagHelper
implementation that creates dropdown menu for page size changing.
The PageSizeOptions
are:
After rendering it will give:
PaginationTagHelper
A TagHelper
implementation creating an array of buttons and other elements forming UI pagination controls without boring manual work.
The PaginationOptions
are:
After rendering it will give:
SortTagHelper
A TagHelper
implementation creating sorting controls for UI.
The SortOptions
are:
After rendering it will give:
TagHelperOutputExtensions
Last updated