/ Published in: VB.NET
                    
                                        If you need to get the DataKey value in RowDataBound (e.g. Assigning the DataKey to the CommandArgument of a button):
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 SomeButton.CommandArgument = Convert.ToString(YourGridview.DataKeys(e.Row.RowIndex).Values(0).ToString())
Comments
                    Subscribe to comments
                
                