C#C
C#4y ago
Gage

✅ Passing Multiple Parameters Through A Button

I would like to call this method:
 public async Task<IActionResult> OnPostAsync(int? id, string type, bool isRemoval){}

With a button like this:
                <form method="post">
                        <input type="hidden" asp-for="" />
                        <input type="submit" value="Delete" class="btn btn-danger" /> |
                    </form>

Is it possible to hard code multiple parameters into a single button?
Was this page helpful?