//INSTANT C# WARNING: Strict 'Handles' conversion only applies to 'WithEvents' fields declared in the same class - the event will be wired in 'SubscribeToEvents': //ORIGINAL LINE: Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting protected void GridView1_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { if (b.DemoMode == false) { string id = GridView1.DataKeys(e.RowIndex).Value.ToString(); DataLayer.SQLDataProvider data = new DataLayer.SQLDataProvider(); data.DeleteGuestbookEntry(id); if (data.SQLError == null) { Alert("Post Deleted."); LoadData(); } else { Alert("An Error occured while deleting post."); } } else { Alert("You are not allowed to delete while in demo mode."); } }