asp.net mvc getting id of button clicked
- by mazhar kaunain baig
<div id="4591" >
<input type="text" id="Title1" name="Title1" value="a" />
<input type="submit" name="button" value="Save" /> </div>
<div id="4592" >
<input type="text" id="Title2" name="Title2" value="a" />
<input type="submit" name="button" value="Save" /> </div>
<div id="4593" >
<input type="text" id="Title3" name="Title3" value="a" />
<input type="submit" name="button" value="Save" /> </div>
This is the copy paste version of the html source generated by the browser which is making it clear that i am generating the dynamic fields on the page. name in the textbox is the field in the database.
After pressing the one of the save buttons how would i send the particular textbox name and value to the controller action to be updated.