// Toggles read status of notifications protected void BtnOnNotif_Click(object sender, EventArgs e) { var lbl = (LinkButton)sender; var item = (ListViewItem)lbl.NamingContainer; int id = Convert.ToInt32(((Label)item.FindControl("lblID")).Text); NotificationBL.ToggleReadNotification(id); FillNotifications(); }