protected void gv_ShowConnections_RowDeleting(object sender, GridViewDeleteEventArgs e) { Guid theOtherId = (Guid)(gv_ShowConnections.DataKeys[e.RowIndex].Values[0]); Guid UserId = (Guid)((Membership.GetUser()).ProviderUserKey); ConnectionBLL.DeleteConnectionBetween(UserId, theOtherId); Response.Redirect("~/Pages/User/Connections.aspx"); }