protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.SiteSettings settings = new BLL.SiteSettings(); settings.LoadByPrimaryKey(1); //fb uiTextBoxFbURL.Text = settings.URL; settings.LoadByPrimaryKey(2); //twitter uiTextBoxTwitterURL.Text = settings.URL; settings.LoadByPrimaryKey(3); //youtube uiTextBoxYtURL.Text = settings.URL; settings.LoadByPrimaryKey(4); //google uiTextBoxGURL.Text = settings.URL; settings.LoadByPrimaryKey(5); // terms ClientScript.RegisterStartupScript(this.GetType(), "addterms", "$(document).ready(function (){ setTimeout(function () { Termseditor.setValue('" + Server.HtmlDecode(settings.Content) + "'); }, 1500); });", true); settings.LoadByPrimaryKey(6); // privacy ClientScript.RegisterStartupScript(this.GetType(), "addprivacy", "$(document).ready(function (){ setTimeout(function () { Privacyeditor.setValue('" + Server.HtmlDecode(settings.Content) + "'); }, 1500); });", true); settings.LoadByPrimaryKey(7); // faq ClientScript.RegisterStartupScript(this.GetType(), "addfaq", "$(document).ready(function (){ setTimeout(function () { Faqeditor.setValue('" + Server.HtmlDecode(settings.Content) + "'); }, 1500); });", true); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.SiteSettings settings = new BLL.SiteSettings(); if(Request.QueryString["node"] != null) { switch (Request.QueryString["node"].ToString()) { case "privacy": settings.LoadByPrimaryKey(6); uiLabelTitle.Text = settings.Name; uiLiteralContent.Text = Server.HtmlDecode(settings.Content); break; case "terms": settings.LoadByPrimaryKey(5); uiLabelTitle.Text = settings.Name; uiLiteralContent.Text = Server.HtmlDecode(settings.Content); break; case "faq": settings.LoadByPrimaryKey(7); uiLabelTitle.Text = settings.Name; uiLiteralContent.Text = Server.HtmlDecode(settings.Content); break; default: Response.Redirect("home.aspx"); break; } } } }