I want to get the cell value from a grid view.
I am using the following code but it produces an error.
Code:
cmd.Parameters.Add("@ProjectCode", SqlDbType.VarChar).Value = ((GridView)TeamMemberGrid.Rows[e.RowIndex].Cells[1].Controls[0]).ToString();
Note:
@ProjectCode
is one of the fields in the grid view.