Get DataKey values in GridView RowCommand
I have a GridView with an associated DataKey, which is the item ID. How do I retrieve that value inside the RowCommand event? This seems to work, but I don't like the cast to LinkButton (what if some other command is firing the event?), and I'm not too confident about the NamingContainer bit. LinkButton lb = (LinkButton)e.CommandSource...