Example #1
0
 /// <summary>
 /// The DeleteBtn_Click event handler on this Page is used to delete an
 /// a Blog.  It  uses the Rainbow.BlogsDB()
 /// data component to encapsulate all data functionality.
 /// </summary>
 /// <param name="e"></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)
     {
         BlogDB blogData = new BlogDB();
         blogData.DeleteBlog(ItemID);
     }
     RedirectBackToReferringPage();
 }
Example #2
0
        public string deleteblog()
        {
            string blogid = Request["blogid"].ToString();

            return(blogdb.DeleteBlog(Int32.Parse(blogid)));
        }