private void EditMode()
        {
            if (ObjectID > 0)
            {
                TG.ExpressCMS.DataLayer.Entities.Settings _Settings = new TG.ExpressCMS.DataLayer.Entities.Settings();
                _Settings = SettingsManager.GetByID(ObjectID);
                if (null == _Settings)
                    return;

                ddlCulturecodes.SelectedValue = _Settings.DefaultLanguageCode;
                txtDefURL.Text = _Settings.DefaultUrl;
                txtphaddress.Text = _Settings.PhysicalPath;
                chkdefault.Checked = _Settings.IsDefault;
                txtName.Text = _Settings.Name;

                plcControls.Visible = true;
            }
        }
        void btnSaveUpdate_Click(object sender, EventArgs e)
        {

            TG.ExpressCMS.DataLayer.Entities.Settings _Settings = new TG.ExpressCMS.DataLayer.Entities.Settings();
            if (ObjectID <= 0)
            {
                try
                {

                    _Settings.Name = txtName.Text;
                    _Settings.DefaultLanguageCode = ddlCulturecodes.SelectedValue;
                    _Settings.DefaultUrl = txtDefURL.Text;
                    _Settings.IsDefault = chkdefault.Checked;
                    _Settings.IsDeleted = false;
                    _Settings.PhysicalPath = txtphaddress.Text;
                    CheckDefault(_Settings);
                    SettingsManager.Add(_Settings);
                    AddMode();
                    dvProblems.InnerText = "Saved Successfully";
                }
                catch (Exception ex)
                {
                    dvProblems.InnerText = ex.ToString();
                }

            }
            else
            {
                try
                {
                    _Settings = SettingsManager.GetByID(ObjectID);
                    if (null == _Settings)
                    {
                        dvProblems.InnerText = Resources.ExpressCMS.ResourceManager.GetString(ConstantsManager.UnknowErronOccures);
                        return;
                    }

                    _Settings.Name = txtName.Text;
                    _Settings.DefaultLanguageCode = ddlCulturecodes.SelectedValue;
                    _Settings.DefaultUrl = txtDefURL.Text;
                    _Settings.IsDefault = chkdefault.Checked;
                    _Settings.IsDeleted = false;
                    _Settings.PhysicalPath = txtphaddress.Text;
                    CheckDefault(_Settings);
                    SettingsManager.Update(_Settings);
                    EditMode();
                    dvProblems.InnerText = "Saved Successfully";
                }
                catch (Exception ex)
                {
                    dvProblems.InnerText = ex.ToString();
                }
            }
            CacheContext.ClearCache();
            BindGrid();
        }