I found it useful to move this answer from comments, so this this can be helpful for others.
on gridview_rowDataBound
event write this code
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ceedfc'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=''");
e.Row.Attributes.Add("style", "cursor:pointer;");
e.Row.Attributes.Add("onclick", "location='WebForm3.aspx?id=" + e.Row.Cells[0].Text + "'");
}
then on next page get value of id by
Id = Request.QueryString["ID"].ToString();