/// <summary> /// The Page_Load server event handler on this user control is used /// to populate the current site settings from the config system /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Load(object sender, EventArgs e) { // If this is the first visit to the page, populate the site data if (Page.IsPostBack == false) { //We flush cache for enable correct localization of items PortalSettings.FlushBaseSettingsCache(portalSettings.PortalPath); siteName.Text = portalSettings.PortalName; sitePath.Text = portalSettings.PortalPath; } EditTable.DataSource = new SortedList(portalSettings.CustomSettings); EditTable.DataBind(); }
/// <summary> /// Is used to update the Site Settings within the Portal Config System /// </summary> /// <param name="e"></param> protected override void OnUpdate(EventArgs e) { // Flush the cache for recovery the changes. [email protected] (30/07/2004) PortalSettings.FlushBaseSettingsCache(portalSettings.PortalPath); //Call base base.OnUpdate(e); // Only Update if Input Data is Valid if (Page.IsValid == true) { //Update main settings and Tab info in the database new PortalsDB().UpdatePortalInfo(portalSettings.PortalID, siteName.Text, sitePath.Text, false); // Update custom settings in the database EditTable.UpdateControls(); // Redirect to this site to refresh Response.Redirect(Request.RawUrl); } }
/// <summary> /// Is used to update the Site Settings within the Portal Config System /// </summary> /// <param name="e"></param> protected override void OnUpdate(EventArgs e) { // Flush the cache for recovery the changes. [email protected] (30/07/2004) PortalSettings.FlushBaseSettingsCache(this.PortalSettings.PortalPath); //Call base base.OnUpdate(e); // Only Update if Input Data is Valid if (Page.IsValid == true) { //Update main settings and Tab info in the database new PortalsDB().UpdatePortalInfo(this.PortalSettings.PortalID, siteName.Text, String.IsNullOrEmpty(sitePath.Text) ? this.PortalSettings.PortalPath : sitePath.Text, false); // Update custom settings in the database EditTable.UpdateControls(); // Redirect to this site to refresh Response.Redirect(HttpUrlBuilder.BuildUrl(this.PortalSettings.ActivePage.PageID)); } }