int row = ((GridViewRow)((Button)sender).NamingContainer).RowIndex; Response.Write(row); 转载于:https://blog.51cto.com/sunzhilu/1007482