In a GridView SelectedIndexChanged event I'm doing this to get the value of a DropDownList:
Dim VoucherNumber As String = CType(sender, DropDownList).SelectedValue
I need to get the value DataKey / Primary Key of the row being edited...
Dim ApplicantID As Integer = [GridView1 DataKey value]
...so I can UPDATE a column in the Applicants table with this:
... .SqlCommand("UPDATE [Applicants] SET [VoucherTypeIssued] = @VoucherType WHERE ([ApplicantID] = @ApplicantID)", conn)