strange way to handle click event of button placed in GridView
The Weird and The Wonderful
1
Posts
1
Posters
0
Views
1
Watching
-
I was assigned to do some changes on built page and I found this.....
protected void btnEditClick(object sender, EventArgs e)
{
for (int i = 0; i < gvContactInfo.Rows.Count; i++)
{
var row = gvContactInfo.Rows[i].Cells[8];ImageButton button = row.FindControl("modifyLink") as ImageButton; if (button.GetHashCode() == SenderButton.GetHashCode()) { ContactInfoView contactInfoView = row.FindControl("ctlContactInfoView") as ContactInfoView; ctlNewContactInfo.ContactInfo = contactInfoView.ContactInfo; } } }