Alternative is, the <asp:gridview xmlns:asp="#unknown"> tag have the attribute setting AutoGenerateSelectButton=true and OnSelectedIndexChanged="selectedIndex_Changed", on the server side
protected void selectedIndex_Changed(object sender, EventArgs e)
{
int selectedIndex=((GridView )sender).SelectedIndex
}
using the selectedIndex, you can get the id value and have redirect command.
or Send me your code.