Row keys for an ASP.NET 2.0 GridView

Written on December 22, 2005

I only just discovered this today, that if you tell a GridView control via its DataKeyNames property what the key column for each row is, then you can retrieve that value later by using the DataKeys property.

eg.

Categories: DotNet