private void loadCustomPage(string url) { CustomPageBL customPageBL = new CustomPageBL(); CustomPage customPage = customPageBL.GetCustomPage(url); if (customPage != null) { Page.Title = customPage.Title; ViewState.Add("pageTitle", customPage.Title); lblHeading.Text = customPage.Heading; divContent.InnerHtml = customPage.Content; lblHeader.Text = customPage.Head; lblFooter.Text = customPage.Footer; } else Server.Transfer("~/errors/not-found.html"); }
private void loadCustomPage(int customPageID) { CustomPageBL customPageBL = new CustomPageBL(); CustomPage customPage = customPageBL.GetCustomPage(customPageID); txtTitle.Text = customPage.Title; txtDescription.Text = customPage.Description; txtUrl.Text = customPage.Url; txtHeading.Text = customPage.Heading; txtHead.Text = customPage.Head; txtInsertDate.Text = customPage._insertDate.ToString(); txtUpdateDate.Text = customPage._updateDate.ToString(); txtContent.Text = customPage.Content; ViewState.Add("customPageID", customPage.ID); lblTitleHeading.Text = customPage.Heading; ViewState.Add("pageTitle", customPage.Title); chkIsActive.Checked = customPage._isActive; cmbCustomPageCategory.SelectedValue = customPage.CustomPageCategory.ID.ToString(); txtFooter.Text = customPage.Footer; }