How to get the value of an input button in an ASP.NET Core MVC controller?
This is my html code in the view
<html>
<body>
<form asp-controller="Home" asp-action="GetstartTime" method="post" id="TableF">
<input id="1" name="f1" form="TableF" class="btn btn-primary" type="submit" value="12:00 PM"/>
<input id="2" name="f2" form="TableF" class="btn btn-primary" type="submit" value="2:00 PM"/>
<input id="3" name="f3" form="TableF" class="btn btn-primary" type="submit" value="3:00 PM"/>
</form>
</body>
</html>
this.Request.Form["f0"]should do fine. Assuming you have aformthere.htmldoesn't even have anyform, it doesn't make much sense to reason about what happens at the server.