I have a GridView in a ASP.NET web application, in which I have added two buttons in each row:
GridView
and your method
protected void MyButtonClick(object sender, System.EventArgs e) { //Get the button that raised the event Button btn = (Button)sender; //Get the row that contains this button GridViewRow gvr = (GridViewRow)btn.NamingContainer; }