A collection of ASP.NET Core Tag Helpers.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
TagHelperSuite.Sample
TagHelperSuite.Tests
TagHelperSuite
.gitignore
LICENSE
README.md
TagHelperSuite.sln

README.md

TagHelperSuite build status

Overview

This collection of Tag Helpers will evolve and expand over time. For now, it includes the following:

  1. <link-button> - Produces an anchor element which posts the form in which it's placed. Brings ASP.NET 4.x Web Forms LinkButton control behavior to ASP.NET Core MVC and Razor Pages.

    Consider the following markup in the Index.cshtml file of a Razor Pages app:

    <form asp-page-handler="Post">
        <link-button>Test Link</link-button>
    </form>

    When clicked, the associated page model's OnPost handler is invoked:

    public class IndexModel : PageModel
    {
        public void OnPost()
        {
        }
    }

Installation

  1. Add a reference to the NuGet package:

    dotnet add package TagHelperSuite
  2. Restore NuGet package:

    dotnet restore
  3. Register the Tag Helpers in _ViewImports.cshtml:

    @addTagHelper *, TagHelperSuite

Acknowledgements

Credit goes to Isaac Levin for the idea that lead to the creation of the <link-button> Tag Helper.