Thank you for the reply. This definitely works but in the loop it is getting the value for all rows. Is there a way to get the Id for only the row the user has clicked the info button for? It does not seem as though the grid knows what row the button belongs to. When I click the edit button the grid knows that I want to edit the row that the edit button is associated with. I need this same result from the custom info button I built for each row.
I have made some progress. What I did was create a GridButtonColumn instead of a GridtemplateColum and used the itemCommand to grab the id like this:
var tested = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["station_id"];
if there is a way to use an ASP Image button to do this exact same thing please let me know as I would like that much more than this.