I have a razor view with a BeginForm command and a loop within that in which I create a html table with a submit button in each row. My question is when I submit the form for a particular row back to the controller how do I ensure that I know which row that button relates to?
Thanks,
Sachin
What’s in my mind is to set a hidden input before submitting the form by a javascript function.
If you use jquery it can be sth like this:
it finds the value of an input containing the ID of a row which its button was clicked.