protected void btnSave_Click(object sender, System.EventArgs e)
    {
        TextEntry text = new TextEntry(ContentName);

        if (!text.IsLoaded)
        {
            text.IsNew = true;
        }
        text.ContentName    = ContentName;
        text.Content        = txtContent.Text;
        text.ListOrder      = 1;
        text.ContentGroupID = 0;
        text.Save(Utility.GetUserName());
        ResultMessage1.ShowSuccess("Content Saved");
    }
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        //save the content up
        TextEntry text = new TextEntry(ContentName);

        //if it's loaded, it exists.
        if (!text.IsLoaded)
        {
            //make sure it's marked new
            text.IsNew = true;
        }
        text.ContentName = ContentName;
        text.Title       = txtTitle.Text;
        text.Content     = txtContent.Text;
        text.Save(Page.User.Identity.Name);
        Response.Redirect(Request.Url.PathAndQuery, false);
    }
        public void Insert(Guid ContentGUID,string Title,string ContentName,string Content,string IconPath,DateTime? DateExpires,string LastEditedBy,string ExternalLink,string Status,int ListOrder,string CallOut,DateTime? CreatedOn,string CreatedBy,DateTime? ModifiedOn,string ModifiedBy)
        {
            TextEntry item = new TextEntry();

            item.ContentGUID = ContentGUID;

            item.Title = Title;

            item.ContentName = ContentName;

            item.Content = Content;

            item.IconPath = IconPath;

            item.DateExpires = DateExpires;

            item.LastEditedBy = LastEditedBy;

            item.ExternalLink = ExternalLink;

            item.Status = Status;

            item.ListOrder = ListOrder;

            item.CallOut = CallOut;

            item.CreatedOn = CreatedOn;

            item.CreatedBy = CreatedBy;

            item.ModifiedOn = ModifiedOn;

            item.ModifiedBy = ModifiedBy;

            item.Save(UserName);
        }