I’d like to know if it’s a bad practice. I have a page of datagrid of 50 rows with about 10 text boxes in each row. Page function is very simple with just a button to update and save in ms sql. When user clicks the button, it takes long time to save. I am using update in a sql loop with a hidden id field id. What is the best way to simply update table?
for (int i=0; i<options_bind.Items.Count; i++)
{
if (((CheckBox)options_bind.Items[i].FindControl("check_Save")).Checked )
{
call sql update one by one here
}
}
Use SqlCommanBuilder to bind data to datagridview
And then on update event