protected void btnDelete_Click(object sender, EventArgs e)
        {
            ContentCategory item = ContentCategory.Get(guidItemID);

            item.Delete();

            Response.Redirect(SiteFilename.CategoryIndexURL);
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ContentCategory item = ContentCategory.Get(guidItemID);

            if (item == null || (item != null && item.ContentCategoryID == Guid.Empty))
            {
                item                   = new ContentCategory();
                item.SiteID            = SiteData.CurrentSiteID;
                item.ContentCategoryID = Guid.NewGuid();
            }

            item.CategorySlug = txtSlug.Text;
            item.CategoryText = txtLabel.Text;
            item.IsPublic     = chkPublic.Checked;

            item.Save();

            Response.Redirect(SiteData.CurrentScriptName + "?id=" + item.ContentCategoryID.ToString());
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.ActivateTab(AdminBaseMasterPage.SectionID.BlogCategory);

            guidItemID = GetGuidIDFromQuery();

            if (!IsPostBack)
            {
                ContentCategory item = ContentCategory.Get(guidItemID);
                if (item != null)
                {
                    txtSlug.Text            = item.CategorySlug;
                    txtLabel.Text           = item.CategoryText;
                    chkPublic.Checked       = item.IsPublic;
                    btnDeleteButton.Visible = true;
                }
                else
                {
                    btnDeleteButton.Visible = false;
                }
            }
        }