Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Button TagHelper for formaction #1668

@yishaigalatzer

Description

@yishaigalatzer

Initial suggestion - Need to fill in more details,

Scenario

A form with multiple buttons, that needs to go do different actions based on what was clicked.

<form ...>
    ...
    <button type="submit" formaction="/Album/Edit">Edit</button>
    <button type="submit" formaction="/Album/Delete">Delete</button>
</form>

A Tag helper look like

<button asp-action="Edit" asp-controller="Album" />

And Generate

<button formaction="Album/Edit" />

Similarly we can make these attributes also work on the input tag helper, when type is submit.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions