Colección de citas famosas - Libros antiguos - Acerca del problema de los campos de gridview vinculantes de CommandArgument.

Acerca del problema de los campos de gridview vinculantes de CommandArgument.

lt;asp:linkbutton id="btn1" CommandArgument='lt;# Eval("ID")gt;'gt;lt;/asp:linkbuttongt;

vacío protegido GridView1_RowCommand(remitente del objeto, GridViewCommandEventArgs e)

{

if (e.CommandName.ToString() == "se")

{

LinkButton myL = (LinkButton)e.CommandSource;

int Index = ((GridViewRow)(myL.NamingContainer)).RowIndex //Obtener el número de fila

string; id = GridView1.DataKeys[Index].Value.ToString(); //Obtener identificación

}

}