HI sir
Sorry I did not know about Add code part. I will make it sure that I would do it from now on.
I am using Comman field button in each row of a gridview. I am displaying trainerID, names,mobile numbers . The name of my command field button is View Profile.
I want to retrieve the trainer iD when i Click on the command field b
I always get row.Cells[1].Text as null.
Please help me out.
Thanks..
protected void GridView1_SelectedIndexChanging(object sender,GridViewSelectEventArgs e)
{
GridViewRow row = (GridViewRow)GridView1.Rows[e.NewSelectedIndex];
Session["contactID"] = row.Cells[1].Text;
Response.RedirectPermanent("~/TrainersDetails.aspx", false);
}