Posted on: 5/24/2011 10:06:45 AM | Views : 935

When I use ans asp gridview button field this works just fine.
Dim row As Integer = Convert.ToInt32(e.CommandArgument) Dim EventId As Integer = ddlSrpEvent.SelectedValue Dim SSN As Integer = myGridViewOut.DataKeys(row).Values("strSSN").ToString  
But when I change to a template field so that I can get a confirm button working I now get an error on this. and it calls our the 1st row.
Input string was not in a correct format. I pull in intgers from the db and put them in the datakey field, do not get why this will not work with the template field.  I event ried the following but then got a object not set to reference error.
 
Dim gvr As GridViewRow Dim Id As String = myGridViewOut.DataKeys(gvr.RowIndex)(0).ToString Dim SSN As String = myGridViewOut.DataKeys(gvr.RowIndex)(1).ToString ...

Go to the complete details ...