D
David C
I am using a GridView to Edit data in a table. The data key in the table is
the column named ContactID and it is in a TemplateField that is
Visible=false. I want to use its value and place it in a textbox with an
ID=txtcnid and have the following code that is failing. Can someone help on
this? Thanks.
David
Protected Sub gvContacts_RowEditing(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewEditEventArgs)
txtcnid.Text = gvContacts.DataKeys(gvContacts.EditIndex).ToString
End Sub
the column named ContactID and it is in a TemplateField that is
Visible=false. I want to use its value and place it in a textbox with an
ID=txtcnid and have the following code that is failing. Can someone help on
this? Thanks.
David
Protected Sub gvContacts_RowEditing(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewEditEventArgs)
txtcnid.Text = gvContacts.DataKeys(gvContacts.EditIndex).ToString
End Sub