asp.net GridView.DataKeys code example
Example: c# get gridview DataKeyNames
foreach (GridViewRow row in grid.Rows)
{
int id = Convert.ToInt32(grid.DataKeys[row.RowIndex].Value.ToString());
}
foreach (GridViewRow row in grid.Rows)
{
int id = Convert.ToInt32(grid.DataKeys[row.RowIndex].Value.ToString());
}