try the following code....
protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
{
if (e.Row.RowType != DataControlRowType.Header && e.Row.RowType
!= DataControlRowType.Footer && e.Row.RowType !=
DataControlRowType.Pager)
{
LinkButton lblTagLink =new LinkButton();
lblTagLink = (LinkButton)e.Row.FindControl("btnAddTags");
lblTagLink.CommandArgument= e.Row.RowIndex.ToString();
}
}
Then get the row index in
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
int RowIndex_ = int.Parse(e.CommandArgument.ToString());
Label lblMediaID_ =
(Label)GridView1.Rows[RowIndex_].FindControl("lblMedia_ID");
}