I have a list of items in my view and each has the below submit input type. Each input type has a dynamic value that is then passed through to the parameter 'int button' so the controller is aware of which button has been selected. View
<input type="submit" name="button" value="@Model.Sites[i].Id" />
Controller
[HttpPost]
public ActionResult ViewInvoice(List<string> invoice, List<int> site, int button = 0)
{
}
The dynamic value is posted correctly to the controller however the buttons are named in the view according to this dynamic value "@Model.Sites[i].Id". How can i set all the button names to "Select" while keeping the dynamic value for my controller?
Thanks in advance.