Пример #1
0
 public static void AddDescritpintags(HtmlHead Header)
 {
     HtmlMeta tag = new HtmlMeta();
     tag.Name = "Title";
     tag.Content = "Best Car Selling Packages to Sell your Car Online at UnitedCarExchange.com";
     Header.Controls.Add(tag);
 }
Пример #2
0
        private void RegisterJavaScriptFiles()
        {
            HtmlHead head = this.Page.Header;

            if (head == null)
            {
                throw new WebException(Resources.GalleryServer.Error_Head_Tag_Missing_Server_Attribute_Ex_Msg);
            }

            if (Utils.IsDebugEnabled) // debug="true" in web.config
            {
                var script = $@"
<script src='{Utils.GetUrl("/script/plupload/moxie.js")}'></script>
<script src='{Utils.GetUrl("/script/plupload/plupload.dev.js")}'></script>
<script src='{Utils.GetUrl("/script/plupload/jquery.ui.plupload.js")}'></script>";

                head.Controls.Add(new LiteralControl(script));
            }
            else
            {
                var script = $@"
<script src='{Utils.GetUrl("/script/plupload/plupload.full.min.js")}'></script>
<script src='{Utils.GetUrl("/script/plupload/jquery.ui.plupload.min.js")}'></script>";

                head.Controls.Add(new LiteralControl(script));
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                {
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
                }
            }

            HtmlHead header    = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();

            headerDes.Name = "Description";
            headerKey.Name = "Keywords";

            header.Title = "Sản phẩm yêu thích";
            if (!IsPostBack)
            {
                Load_prolike();
            }
        }
Пример #4
0
        public void Bind_meta_tags_index()
        {
            HtmlHead header    = base.Header;
            HtmlMeta headerDes = new HtmlMeta();
            HtmlMeta headerKey = new HtmlMeta();

            headerDes.Name = "Description";
            headerKey.Name = "Keywords";
            var _configs = cf.Config_meta();

            if (_configs.ToList().Count > 0)
            {
                if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON))
                {
                    ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />";
                }
                header.Title = _configs.ToList()[0].CONFIG_TITLE;

                headerDes.Content = _configs.ToList()[0].CONFIG_DESCRIPTION;
                header.Controls.Add(headerDes);

                headerKey.Content = _configs.ToList()[0].CONFIG_KEYWORD;
                header.Controls.Add(headerKey);
            }
            else
            {
                header.Title = "Enews Standard V1.0";

                headerDes.Content = "Enews Standard V1.0";
                header.Controls.Add(headerDes);

                headerKey.Content = "Enews Standard V1.0";
                header.Controls.Add(headerKey);
            }
        }
Пример #5
0
        /// <summary>
        /// Initializes the controls.
        /// </summary>
        private void InitControls()
        {
            MainPanel = new Panel {
                ID = "mainPanel"
            };

            Controls.Add(new LiteralControl("<!DOCTYPE html>" + Environment.NewLine + "<html>" + Environment.NewLine));

            Head = new HtmlHead {
                Title = TitleText
            };
            Head.Controls.Add(GetEncodingMetaTag());

            Controls.Add(Head);
            Controls.Add(new LiteralControl("<body>"));

            HeaderPanel = new Panel {
                ID = "headerPanel"
            };
            BodyPanel = new Panel {
                ID = "bodyPanel"
            };
            FooterPanel = new Panel {
                ID = "footerPanel"
            };

            MainPanel.Controls.Add(HeaderPanel);
            MainPanel.Controls.Add(BodyPanel);
            MainPanel.Controls.Add(FooterPanel);

            Controls.Add(MainPanel);

            Controls.Add(new LiteralControl(Environment.NewLine + "</body>" + Environment.NewLine + "</html>"));
        }
        /// <exclude />
        public static Control AsAspNetControl(this XhtmlDocument xhtmlDocument, IXElementToControlMapper controlMapper)
        {
            using (TimerProfilerFacade.CreateTimerProfiler())
            {
                var htmlControl = new HtmlGenericControl("html");
                CopyAttributes(xhtmlDocument.Root, htmlControl);

                HtmlHead headControl = xhtmlDocument.BuildHtmlHeadControl(controlMapper);

                Control bodyControl = xhtmlDocument.Body.AsAspNetControl(controlMapper);

                htmlControl.Controls.Add(headControl);
                htmlControl.Controls.Add(bodyControl);

                PlaceHolder pageHolder = new PlaceHolder();
                if (xhtmlDocument.DocumentType != null)
                {
                    string docType = xhtmlDocument.DocumentType.ToString();
                    var    offset  = docType.IndexOf("[]", StringComparison.Ordinal);
                    if (offset >= 0)
                    {
                        docType = docType.Remove(offset, 2);
                    }

                    pageHolder.Controls.Add(new LiteralControl(docType));
                }
                pageHolder.Controls.Add(htmlControl);

                return(pageHolder);
            }
        }
Пример #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Title      = "제목변경";
            Page.Title = "또 제목변경";

            // <link rel="stylesheet" href="Content/main.css" /> 의 기능과 동일
            HtmlLink cssLink = new HtmlLink();

            cssLink.Href = "Content/main.css";
            cssLink.Attributes.Add("rel", "stylesheet");
            cssLink.Attributes.Add("type", "text/css");

            HtmlHead htmlHead = Page.Header;

            htmlHead.Controls.Add(cssLink);

            // 제일 중요
            if (!Page.IsPostBack)
            {
                Response.Write("[1] 폼이 최초로드되었습니다.<br />");
            }
            else
            {
                Response.Write("[2] 폼이 다시 로드되었습니다.<br />");
            }

            Response.Write("[3] 항상 실행.<br />");
        }
Пример #8
0
    private static void PAGE_META(HtmlHead _hd, string keywords, string description)
    {

        HtmlMeta hm1 = new HtmlMeta();
        hm1.Name = "description";
        hm1.Content = description;
        _hd.Controls.Add(hm1);
    }
Пример #9
0
    private static void PAGE_META(HtmlHead _hd, string keywords, string description)
    {
        HtmlMeta hm1 = new HtmlMeta();

        hm1.Name    = "description";
        hm1.Content = description;
        _hd.Controls.Add(hm1);
    }
        private static HtmlHead BuildHtmlHeadControl(this XhtmlDocument xhtmlDocument, IXElementToControlMapper controlMapper)
        {
            var headControl = new HtmlHead();

            xhtmlDocument.MergeToHeadControl(headControl, controlMapper);

            return(headControl);
        }
Пример #11
0
        public static void ThemMetaDescript(HtmlHead head, string descript)
        {
            var _MyName = new HtmlMeta {
                Name = "description", Content = descript
            };

            head.Controls.Add(_MyName);
        }
Пример #12
0
        public Html()
        {
            _head = new HtmlHead();
            _body = new HtmlBody();

            this.AddChild(this._body);
            this.AddChild(this._head);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        // set meta information
        HtmlHead head             = (HtmlHead)Page.Header;
        string   meta_title       = Resources.vsk.meta_terms_title;
        string   meta_description = Resources.vsk.meta_terms_description;

        MetaTagsBLL.META_StaticPage(this.Page, head, meta_title, meta_description, UrlConfig.Return_Website_Logo_Url(), Config.GetUrl("terms.aspx"));
    }
Пример #14
0
        /// <summary>
        /// Adds the new tag
        /// </summary>
        /// <param name="tagName">Name of the tag.</param>
        /// <param name="content">The content.</param>
        private void AddTag(string tagName, string content)
        {
            HtmlMeta hm   = new HtmlMeta();
            HtmlHead head = page.Header;

            hm.Name    = tagName;
            hm.Content = content;
            head.Controls.Add(hm);
        }
Пример #15
0
        //-------------------------------------
        // Html
        //-------------------------------------
        /// <summary>在页面头部注册移动端适配的meta语句</summary>
        public static void RegistMobileMeta()
        {
            HtmlHead head = Page.Header;
            HtmlMeta meta = new HtmlMeta();

            meta.Name    = "viewport";
            meta.Content = "width=device-width, initial-scale=1.0";
            head.Controls.AddAt(0, meta);
        }
Пример #16
0
        public void AddMeta(string name, string content)
        {
            HtmlMeta meta = new HtmlMeta();
            HtmlHead head = (HtmlHead)_page.Header;

            meta.Name    = name;
            meta.Content = content;
            head.Controls.Add(meta);
        }
Пример #17
0
 private void RegisterScript(ClientScriptManager cs, string scriptfile, HtmlHead head)
 {
     //LiteralControl lctl = new LiteralControl(string.Format("<script src=\"{0}\" type=\"text/javascript\" />", this.Page.ClientScript.GetWebResourceUrl(typeof(XWT.Web.Controls.PageManager), scriptfile)));
     //head.Controls.Add(lctl);
     if (!string.IsNullOrEmpty(scriptfile) && scriptfile.Length > 2)
     {
         cs.RegisterClientScriptInclude(typeof(XWT.Web.Controls.XWTPageManager), scriptfile.Substring(0, scriptfile.LastIndexOf(".js")), Page.ResolveClientUrl(scriptfile));
     }
 }
Пример #18
0
        protected override void InitDialogTitle(HtmlHead header)
        {
            if (this.DialogTitle.IsNullOrEmpty())
            {
                this.DialogTitle = "流程参数列表";
            }

            base.InitDialogTitle(header);
        }
Пример #19
0
    public static void AddStyleSheet(HtmlHead header, string cssPath)
    {
        HtmlLink lnk = new HtmlLink();
        lnk.Href = cssPath;
        lnk.Attributes["text"] = "text/css";
        lnk.Attributes["rel"] = "stylesheet";

        header.Controls.Add(lnk);
    }
Пример #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //동적으로 페이지의 제목을 변경하는 세 가지 방법
            Title             = "제목이 바뀝니다.";
            Page.Title        = "제목이 출력이 됩니다.";
            Page.Header.Title = "Page 클래스";

            //외부 스타일시트 정의
            HtmlLink objHtmlLink = new HtmlLink();

            objHtmlLink.Href = "DevASPNET.css";
            objHtmlLink.Attributes.Add("rel", "stylesheet");
            objHtmlLink.Attributes.Add("type", "text/css");

            //Head 태그 정의, 외부스타일과 메타태그 등록
            HtmlHead objHtmlHead = Page.Header;

            objHtmlHead.Controls.Add(objHtmlLink);

            // 동적으로 페이지에 스타일시트를 적용하는 방법
            Style objButtonStyle = new Style();

            objButtonStyle.ForeColor =
                System.Drawing.Color.Navy; // color:Navy;
            objButtonStyle.Font.Size = 9;  // font-size:9pt
            objButtonStyle.Font.Name = "Verdana";
            Page.Header.StyleSheet.RegisterStyle(
                objButtonStyle, null);
            this.btnNewLoad.CssClass =
                objButtonStyle.RegisteredCssClass;
            this.btnPostBack.CssClass =
                objButtonStyle.RegisteredCssClass;

            Style objDivStyle = new Style();

            objDivStyle.ForeColor   = System.Drawing.Color.Blue;
            objDivStyle.Font.Size   = 9;
            objDivStyle.Font.Name   = "Verdana";
            objDivStyle.Font.Italic = true;
            Page.Header.StyleSheet.CreateStyleRule(
                objDivStyle, null, "body, div");

            // 버튼을 클릭하면 [1][2]번 코드는 실행되지 않는다.
            if (!Page.IsPostBack)
            {
                Response.Write(
                    "[1] 폼이 처음 로드할 때에만 실행<br />");
            }
            if (Page.IsPostBack == false)
            {
                Response.Write(
                    "[2] 폼이 처음 로드할 때에만 실행<br />");
            }
            Response.Write(
                "[3] 폼이 로드할 때마다 실행<br />");
        }
Пример #21
0
        public void HtmlTest()
        {
            var           line             = new JavaScriptOperation(TEST_TEXT);
            var           head             = new HtmlHead();
            PrivateObject headObj          = new PrivateObject(head);
            var           expectedHtmlCode = String.Format("{0}{1}", headObj.GetField("_required", BindingFlags.NonPublic | BindingFlags.Static), line.HtmlCode);

            Assert.IsTrue(head.AddElement(line));
            Assert.AreEqual(head.Html, expectedHtmlCode);
        }
Пример #22
0
        /// <summary>
        /// 初始化对话框窗口标题
        /// </summary>
        /// <param name="header"></param>
        protected virtual void InitDialogTitle(HtmlHead header)
        {
            if (this.Page.IsCallback == false)
            {
                HtmlTitle title = new HtmlTitle();

                title.Text = Translate(this.DialogTitle);
                header.Controls.Add(title);
            }
        }
Пример #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlHead header = (HtmlHead)this.Master.FindControl("head1");

        header.Title = UserInfoConfig.GetUserConfig("title");
        if (!IsPostBack)
        {
            //Check_Power(999, 999, true);
        }
    }
Пример #24
0
        private void RegisterSkinCSS(string portalSkin)
        {
            HtmlHead head = (HtmlHead)Page.Header;
            HtmlLink link = new HtmlLink();

            link.Attributes.Add("href", Page.ResolveClientUrl(portalSkin + "skin.css"));
            link.Attributes.Add("type", "text/css");
            link.Attributes.Add("rel", "stylesheet");
            head.Controls.Add(link);
        }
Пример #25
0
    public void AddMeta(string szMetaName, string szValue)
    {
        AddBRInHeader();
        HtmlHead head = (HtmlHead)Page.Header;
        HtmlMeta meta = new HtmlMeta();

        meta.Name    = szMetaName;
        meta.Content = szValue;
        head.Controls.Add(meta);
    }
Пример #26
0
        /// <summary>
        /// Gets the ASP.Net page that will serve html to user agent.
        /// </summary>
        /// <returns>The Page.</returns>
        public Page GetPage()
        {
            if (_request == null && _response == null)
            {
                throw new InvalidOperationException("A response or request message MUST be specified before generating the page.");
            }

            var msg = _request ?? _response;

            var p = new Page
            {
                EnableViewState    = false,
                EnableViewStateMac = false
            };

            p.Controls.Add(new LiteralControl("<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine));
            p.Controls.Add(new LiteralControl("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">" + Environment.NewLine));

            var head = new HtmlHead {
                Title = "SAML2.0 POST binding"
            };

            p.Controls.Add(head);

            p.Controls.Add(new LiteralControl(Environment.NewLine + "<body onload=\"document.forms[0].submit()\">" + Environment.NewLine));
            p.Controls.Add(new LiteralControl("<noscript><p><strong>Note:</strong> Since your browser does not support JavaScript, you must press the Continue button once to proceed.</p></noscript>"));

            p.Controls.Add(new LiteralControl("<form action=\"" + _destinationEndpoint.Url + "\" method=\"post\"><div>"));

            if (!string.IsNullOrEmpty(RelayState))
            {
                var relayStateHidden = new HtmlInputHidden
                {
                    ID    = "RelayState",
                    Name  = "RelayState",
                    Value = RelayState
                };
                p.Controls.Add(relayStateHidden);
            }

            var action = new HtmlInputHidden
            {
                Name  = Enum.GetName(typeof(SamlActionType), Action),
                ID    = Enum.GetName(typeof(SamlActionType), Action),
                Value = Convert.ToBase64String(Encoding.UTF8.GetBytes(msg))
            };

            p.Controls.Add(action);

            p.Controls.Add(new LiteralControl("<noscript><div><input type=\"submit\" value=\"Continue\"/></div></noscript>"));
            p.Controls.Add(new LiteralControl("</div></form>"));
            p.Controls.Add(new LiteralControl(Environment.NewLine + "</body>" + Environment.NewLine + "</html>"));

            return(p);
        }
Пример #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlHead header = (HtmlHead)this.Master.FindControl("head1");

        header.Title = UserInfoConfig.GetUserConfig("title");
        if (!IsPostBack)
        {
            //Check_Power(17, 73, true);
            txtDate.Text = DateTime.Now.ToString();
        }
    }
Пример #28
0
    //private string aid;
    protected void Page_Init(object sender, System.EventArgs e)
    {
        // register css
        HtmlHead head = (HtmlHead)Page.Header;
        HtmlLink link = new HtmlLink();

        link.Attributes.Add("href", Page.ResolveClientUrl("~/omaRouppi.css"));
        link.Attributes.Add("type", "text/css");
        link.Attributes.Add("rel", "stylesheet");
        head.Controls.Add(link);
    }
Пример #29
0
    private static void AddMeta(HtmlHead head, string name, string content)
    {
        // Prepare the meta tag
        HtmlMeta metaTag = new HtmlMeta();

        metaTag.Name    = name;
        metaTag.Content = content;

        // Add the meta tag to the head
        head.Controls.Add(metaTag);
    }
Пример #30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlHead header = (HtmlHead)this.Master.FindControl("head1");

        header.Title = UserInfoConfig.GetUserConfig("title");
        if (!IsPostBack)
        {
            string headers = Tools.GetStringSafeFromQueryString(this.Page, "header");
            EditStatus();
        }
    }
        internal static void MergeToHeadControl(this XhtmlDocument xhtmlDocument, HtmlHead headControl, IXElementToControlMapper controlMapper)
        {
            XElement headSource = xhtmlDocument.Head;

            if (headSource == null)
            {
                return;
            }

            CopyAttributes(headSource, headControl);

            XElement titleElement = headSource.Elements(XName_Title).LastOrDefault();

            if (titleElement != null)
            {
                HtmlTitle existingControl = headControl.Controls.OfType <HtmlTitle>().FirstOrDefault();

                if (existingControl != null)
                {
                    headControl.Controls.Remove(existingControl);
                }

                // NOTE: we aren't using headControl.Title property since it adds "<title>" tag as the last one
                headControl.Controls.AddAt(0, new HtmlTitle {
                    Text = HttpUtility.HtmlEncode(titleElement.Value)
                });
            }

            var metaTags        = headSource.Elements().Where(f => f.Name == XName_Meta);
            int metaTagPosition = Math.Min(1, headControl.Controls.Count);

            foreach (var metaTag in metaTags)
            {
                var metaControl = new HtmlMeta();
                foreach (var attribute in metaTag.Attributes())
                {
                    if (attribute.Name.LocalName == "id")
                    {
                        metaControl.ID = attribute.Value;
                    }
                    else
                    {
                        metaControl.Attributes.Add(attribute.Name.LocalName, attribute.Value);
                    }
                }
                headControl.Controls.AddAt(metaTagPosition++, metaControl);
            }

            ExportChildNodes(headSource.Nodes().Where(f =>
                                                      !(f is XElement element) || (element.Name != XName_Title && element.Name != XName_Meta)),
                             headControl, controlMapper);

            headControl.RemoveDuplicates();
        }
Пример #32
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlHead header = (HtmlHead)this.Master.FindControl("head1");

        header.Title = UserInfoConfig.GetUserConfig("title");
        if (!IsPostBack)
        {
            InsertDropdown();
            Bind();
        }
    }
Пример #33
0
        /// <summary>
        /// Every time this method is called, a single metadata element is added to the
        /// head of the page.
        /// </summary>
        /// <param name="htmlHead">The html header control of the page.The head html tag should have runat="server"</param>
        /// <param name="htmlMetaDataType">The name of the metadata element you want to add</param>
        private void addMetaDataItem(HtmlHead htmlHead, HtmlMetaDataType htmlMetaDataType)
        {
            HtmlMeta hm = new HtmlMeta();

            hm.Name    = htmlMetaDataType.ToString().ToLower();
            hm.Content = getMetaData(htmlMetaDataType);

            if (htmlMetaDataType == HtmlMetaDataType.ContentLanguage)
            {
                hm.Name = "content-language";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.ContentType)
            {
                hm.Name = "dcterms.type";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.Coverage)
            {
                hm.Name = "dcterms.coverage";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.Subject)
            {
                hm.Name = "dcterms.subject";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.IsPartOf)
            {
                hm.Name = "dcterms.isPartOf";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.DatePublished)
            {
                hm.Name = "dcterms.issued";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.EnglishLinkingPolicy)
            {
                hm.Name = "english-linking-policy";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.EspanolLinkingPolicy)
            {
                hm.Name = "espanol-linking-policy";
            }
            else if (htmlMetaDataType == HtmlMetaDataType.Robots)
            {
                // If robots content has not been set, do not create robots meta tag
                if (hm.Content == "")
                {
                    return;
                }
                else
                {
                    hm.Name = "robots";
                }
            }

            htmlHead.Controls.Add(hm);
        }
Пример #34
0
    private static void FB_META(HtmlHead _hd, string title, string description, string imageurl, string url)
    {
        if (Social_Settings.ShowFacebookMetaTags)
        {
            // og title
            HtmlMeta ogtitle = new HtmlMeta();
            ogtitle.Attributes.Add("property", "og:title");
            ogtitle.Attributes.Add("content", title);
            _hd.Controls.Add(ogtitle);
            // og description
            HtmlMeta ogdescription = new HtmlMeta();
            ogdescription.Attributes.Add("property", "og:description");
            ogdescription.Attributes.Add("content", description);
            _hd.Controls.Add(ogdescription);
            // og image
            if (imageurl != "")
            {
                HtmlMeta ogimage = new HtmlMeta();
                ogimage.Attributes.Add("property", "og:image");
                ogimage.Attributes.Add("content", imageurl);
                _hd.Controls.Add(ogimage);
            }
            // og type
            HtmlMeta ogtype = new HtmlMeta();
            ogtype.Attributes.Add("property", "og:type");
            ogtype.Attributes.Add("content", "article");
            _hd.Controls.Add(ogtype);

            // og url
            if (url != "")
            {
                HtmlMeta ogurl = new HtmlMeta();
                ogurl.Attributes.Add("property", "og:url");
                ogurl.Attributes.Add("content", url);
                _hd.Controls.Add(ogurl);
            }
            // og site name
            HtmlMeta ogsitename = new HtmlMeta();
            ogsitename.Attributes.Add("property", "og:site_name");
            ogsitename.Attributes.Add("content", Site_Settings.Website_Title);
            _hd.Controls.Add(ogsitename);

            // fb app id
            HtmlMeta fbappid = new HtmlMeta();
            fbappid.Attributes.Add("property", "fb:app_id");
            fbappid.Attributes.Add("content", Social_Settings.FB_AppID);
            _hd.Controls.Add(fbappid);
        }
    }
Пример #35
0
 public static void AddMetatags(HtmlHead  Header)
 {
     HtmlMeta tag = new HtmlMeta();
     tag.Name = "description";
     tag.Content = "My description for this page";
     Header.Controls.Add(tag);
 }
Пример #36
0
    public static void Addkeywordstags(HtmlHead Header)
    {
        if (HttpContext.Current.Session["CurrentPage"] == "Home")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online";
            Header.Controls.Add(tag);
        }

        else  if (HttpContext.Current.Session["CurrentPage"] == "Account")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Contact Us")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Used Cars")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "New Cars")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Packages")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "DealerReg")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Search Results Page")
        {
            /*
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
             */
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Finance Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Auto Finance, Auto Lending, Auto Finance for Cars, Auto Loan Financing, Used Car Loans, Used Car Finance, Used Auto Loans";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "How it Works Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Testimonials")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "T & C Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Return Policy Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "keywords";
            tag.Content = "Used Cars, New Cars, Used Cars Online, Used Cars for Sale, New Cars for Sale, Secondhand Cars Online, Find Cars Online, Used Vehicles online, Search Used Cars, Search New Cars";
            Header.Controls.Add(tag);
        }

        // DESCRIPTION

        if (HttpContext.Current.Session["CurrentPage"] == "Home")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Search all your favorite cars at UnitedCarExchange.com. Buy & Sell best quality used cars and new cars online.";
            Header.Controls.Add(tag);
        }

        else if (HttpContext.Current.Session["CurrentPage"] == "Account")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "United Car Exchange is the most trusted online used car agency. We help in providing an online platform where car buyers and sellers can search, buy, sell their Used/ New cars.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Contact Us")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "United Car Exchange is the most trusted online used car agency. We help in providing an online platform where car buyers and sellers can search, buy, sell their Used/ New cars.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Used Cars")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "United Car Exchange is the most trusted online used car agency. We help in providing an online platform where car buyers and sellers can search, buy, sell their Used/ New cars.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "New Cars")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "We provide detailed car information about each and every car make, model, pricing info, monthly calculator tools with reviews which help to take confident decisions to buy your new car.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Packages")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Select our best package which includes Ads, photo uploading, and Ad traffic reports with money back guarantee options to sell your car online without risk.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "DealerReg")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "If you are a car dealer, this is the right place to connect with people who want to buy used cars online. We connect dealers and car customers online to make online car sale without risk.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Search Results Page")
        {
            /*
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Search and buy used cars. Enter your zip code and specifications like car make and model to find your favorite car to buy online.";
            Header.Controls.Add(tag);
             */
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Finance Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "We at United Car Exchange provide your various Financing options like Auto Finance and Auto Lending options for our customers.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "How it Works Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Buy or Sell - New & Used Cars Online at United Car Exchange for best prices with best financial options.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Testimonials")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Find Customers testimonials after using United Car Exchange’s buying and selling services online.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "T & C Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Our terms and conditions to buy or sell – new & used cars online at UnitedCarExchange.com";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Return Policy Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Description";
            tag.Content = "Our money return policy to buy or sell – new and used cars online at United Car Exchange.";
            Header.Controls.Add(tag);
        }

        // Titles

        if (HttpContext.Current.Session["CurrentPage"] == "Home")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            //tag.Content
            Header.Title  = "Search Used Cars, Buy & Sell Used Cars and New Cars Online at UnitedCarExchange.com ";
        }

        else if (HttpContext.Current.Session["CurrentPage"] == "Account")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "United Car Exchange is the most trusted online used car agency. We help in providing an online platform where car buyers and sellers can search, buy, sell their Used/ New cars.";
            //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Contact Us")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            tag.Content = "United Car Exchange is the most trusted online used car agency. We help in providing an online platform where car buyers and sellers can search, buy, sell their Used/ New cars.";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Used Cars")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "Search and Find all Branded Used Cars Online for Sale at UnitedCarExchange.com";
            //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "New Cars")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            tag.Content = "Search & Find New Cars for Sale, Compare Prices at UnitedCarExchange.com";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Packages")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "Best Car Selling Packages to Sell your Car Online at UnitedCarExchange.com";
            //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "DealerReg")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "Are You a Car Dealer–Buy or Sell Your Used Cars Online at UnitedCarExchange.com";
           //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Search Results Page")
        {
            /*
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "Search and buy used cars. Enter your zip code and specifications like car make and model to find your favorite car to buy online.";
            */
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Finance Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "United Car Exchange Financial Options to Buy or Sell Used Cars Online";
            //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "How it Works Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "United Car Exchange Process to Buy or Sell Used Cars Online";
            //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Testimonials")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            tag.Content = "Buy or Sell Used Cars Online at United Car Exchange – Testimonials";
            Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "T & C Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "United Car Exchange – Terms and Conditions";
            //Header.Controls.Add(tag);
        }
        else if (HttpContext.Current.Session["CurrentPage"] == "Return Policy Page")
        {
            HtmlMeta tag = new HtmlMeta();
            tag.Name = "Title";
            Header.Title = "United Car Exchange –Return Policy to Buy or Sell Used Cars";
            //Header.Controls.Add(tag);
        }
    }