protected void Page_Load(object sender, EventArgs e)
        {
            db = new MainDataContext();
            // buttons //

            btnContinue.EventHandler = Continue;

            // process //
            CurrentMeta = db.Metas.SingleOrDefault(p => p.Reference == Reference);

            PermissionManager PermissionManager = ((AdminPage)Page).PermissionManager;

            btnContinue.Visible = PermissionManager.CanUpdate;
            if (!PermissionManager.CanAdd && CurrentMeta == null)
            {
                Response.Redirect("list.aspx");
            }


            if (!Page.IsPostBack)
            {
                if (CurrentMeta != null)
                {
                    PopulateFields();
                }
            }
        }
        private void SaveRecord(bool newRecord)
        {
            if (newRecord)
            {
                CurrentMeta           = new CRM.Code.Models.Meta();
                CurrentMeta.Reference = Reference;
                db.Metas.InsertOnSubmit(CurrentMeta);
            }

            CurrentMeta.Title       = txtTitle.Text;
            CurrentMeta.Keywords    = txtKeywords.Text;
            CurrentMeta.Description = txtDescription.Text;

            db.SubmitChanges();

            NoticeManager.SetMessage("Meta Saved");
        }