获取GRIDVIEW模板列中的控件所在的行 protected void TextBox1_TextChanged(object sender, EventArgs e){ TextBox txt = sender as TextBox ; int index = (txt .NamingContainer as GridViewRow).RowIndex;}