I’ve got a list of items in an order to show in asp.net — each item (row) will have 3 textboxes so the user can both view and change that piece of data (shipping cost, handling cost, price).
What would be one ‘recommended’ way to accomplish this? With a repeater, I assume I’d then have to loop through the form values on postback, and with a gridview control I’d have to override onrowdatabound and on Postback some other method.
I’m sure both would work, but what do YOU as a developer choose in this situation?
What I’ve done in the past is use data-bound GridView TemplateColumns:
Then, on postback (say, a ‘Save’ button click), you can loop through the rows in the GridView and pluck the values out of the textboxes: