I Have a "For Loop" In ASP.NET Core Like This :
<button type="submit" Form="FormActive" name="id" value="@item.I"></button>
<!--It Will Create SomeThing Like This:-->
<button type="submit" Form="FormActive" name="id" value="1"></button>
<button type="submit" Form="FormActive" name="id" value="2"></button>
<button type="submit" Form="FormActive" name="id" value="3"></button>
... ... ... ... 4
... ... ... ... 99
<!--And This Is My Single Form : -->
<form id="FormActive" action="/action_page">
</form>
Whats The Problem? why This Form Just Send A httpRequest POST Without"ID" And Value?(infact It Will Send A Post Request With Empty Body)
What I Should To do for send ID
Edit: I cant Remove Form - And I Cant Use +99 Form too maybe i need jquery ... or something?
How about try
asp-action, likeThen in controller:
result:
Update:
Try to use
<a>tag without With Tag FormThen in controller;
result:
Update2 We can add a hidden
<input>in the form to get the id like:result: