I have code that is doing some updating to a record. Its getting the ID to update from the Grid. I'm passing an INT to my method to update the record. My code is working though I'm still getting an 'input string was not in a correct format.'
Code:
foreach (GridViewRow row in grid.Rows)
{
CheckBox chk = (CheckBox)gr.FindControl("checkbox");
if (chk.Checked)
{
Data+= grid.DataKey[grid.RowIndex].value + ";";
}
}
String[] rowValues= Data.Split(';');
foreach (string updateValues in rowValues
{
Update.UpdateUserRow(Convert.ToInt32(updateValues) );
}
this is updating the record that is selected in the grid, but I'm getting the error
'input string was not in a correct format.'
any idea why?