/// <summary> /// The DeleteBtn_Click event handler on this Page is used to delete /// a link. It uses the Rainbow.EnhancedLinkDB() /// data component to encapsulate all data functionality. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected override void OnDelete(EventArgs e) { base.OnDelete(e); // Only attempt to delete the item if it is an existing item // (new items will have "ItemID" of 0) if (ItemID != 0) { EnhancedLinkDB enhancedLinks = new EnhancedLinkDB(); enhancedLinks.DeleteEnhancedLink(ItemID); } // Redirect back to the portal home page RedirectBackToReferringPage(); }