protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.BindData();

            if (this.LocalizedTopic != null)
            {
                //title
                string title = this.LocalizedTopic.MetaTitle;
                if (String.IsNullOrEmpty(title))
                {
                    title = this.LocalizedTopic.Title;
                }
                if (!string.IsNullOrEmpty(title))
                {
                    SEOHelper.RenderTitle(this.Page, title, true);
                }

                //meta
                if (!String.IsNullOrEmpty(this.LocalizedTopic.MetaDescription))
                {
                    SEOHelper.RenderMetaTag(this.Page, "description", this.LocalizedTopic.MetaDescription, true);
                }
                if (!String.IsNullOrEmpty(this.LocalizedTopic.MetaKeywords))
                {
                    SEOHelper.RenderMetaTag(this.Page, "keywords", this.LocalizedTopic.MetaKeywords, true);
                }
            }
        }
    private void OverRideSEOInfo(string categorykey, int storeID, int portalID, string userName, string cultureName)
    {
        CategorySEOInfo dtCatSEO = GetSEOSettingsByCategoryName(categorykey, storeID, portalID, userName, cultureName);

        if (dtCatSEO != null)
        {
            string PageTitle       = dtCatSEO.MetaTitle.ToString();
            string PageKeyWords    = dtCatSEO.MetaKeywords.ToString();
            string PageDescription = dtCatSEO.MetaDescription.ToString();

            if (!string.IsNullOrEmpty(PageTitle))
            {
                SEOHelper.RenderTitle(this.Page, PageTitle, false, true, this.GetPortalID);
            }

            if (!string.IsNullOrEmpty(PageKeyWords))
            {
                SEOHelper.RenderMetaTag(this.Page, "KEYWORDS", PageKeyWords, true);
            }

            if (!string.IsNullOrEmpty(PageDescription))
            {
                SEOHelper.RenderMetaTag(this.Page, "DESCRIPTION", PageDescription, true);
            }
        }
    }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AddPoweredBy();
            if (!Page.IsPostBack)
            {
                CheckAffiliate();
            }

            string defaulSEOTitle       = SettingManager.GetSettingValue("SEO.DefaultTitle");
            string defaulSEODescription = SettingManager.GetSettingValue("SEO.DefaultMetaDescription");
            string defaulSEOKeywords    = SettingManager.GetSettingValue("SEO.DefaultMetaKeywords");

            SEOHelper.RenderTitle(this.Page, defaulSEOTitle, false, false);
            SEOHelper.RenderMetaTag(this.Page, "description", defaulSEODescription, false);
            SEOHelper.RenderMetaTag(this.Page, "keywords", defaulSEOKeywords, false);

            if (SettingManager.GetSettingValueBoolean("Display.ShowNewsHeaderRssURL"))
            {
                SEOHelper.RenderHeaderRSSLink(this.Page, defaulSEOTitle + ": News", SEOHelper.GetNewsRssURL());
            }
            if (SettingManager.GetSettingValueBoolean("Display.ShowBlogHeaderRssURL"))
            {
                SEOHelper.RenderHeaderRSSLink(this.Page, defaulSEOTitle + ": Blog", SEOHelper.GetBlogRssURL());
            }
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //TODO use Response.Cache.SetCacheability(HttpCacheability.NoCache); or  Response.Cache.SetNoStore();
            Response.CacheControl = "private";
            Response.Expires      = 0;
            Response.AddHeader("pragma", "no-cache");

            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureSSL();
            }

            if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
            {
                string loginURL = CommonHelper.GetLoginPageURL(true);
                Response.Redirect(loginURL);
            }

            string title = GetLocaleResourceString("PageTitle.Account");

            SEOHelper.RenderTitle(this, title, true);

            if (!Page.IsPostBack)
            {
                pnlAvatar.Visible = CustomerManager.AllowCustomersToUploadAvatars;
            }
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (category == null || category.Deleted || !category.Published)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = string.Empty;

            if (!string.IsNullOrEmpty(category.LocalizedMetaTitle))
            {
                title = category.LocalizedMetaTitle;
            }
            else
            {
                title = category.LocalizedName;
            }
            SEOHelper.RenderTitle(this, title, true);
            SEOHelper.RenderMetaTag(this, "description", category.LocalizedMetaDescription, true);
            SEOHelper.RenderMetaTag(this, "keywords", category.LocalizedMetaKeywords, true);

            if (!Page.IsPostBack)
            {
                NopContext.Current.LastContinueShoppingPage = CommonHelper.GetThisPageUrl(true);
            }
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureNonSSL();

                Customer customer = CustomerManager.GetCustomerByID(this.CustomerID);
                if (customer == null || customer.IsGuest)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (!CustomerManager.AllowViewingProfiles)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                string name = CustomerManager.FormatUserName(customer);
                lTitle.Text = string.Format(GetLocaleResourceString("Profile.ProfileOf"), Server.HtmlEncode(name));
            }

            string title = GetLocaleResourceString("PageTitle.Profile");

            SEOHelper.RenderTitle(this, title, true);
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string title = GetLocaleResourceString("PageTitle.MeetComposersPage");
                SEOHelper.RenderTitle(this, title, true);
                if (!string.IsNullOrEmpty(Request.QueryString["Filter"]))
                {
                    string alpha = "";
                    alpha          = Request.QueryString["Filter"];
                    hdfalpha.Value = alpha;
                    string FirstLetter      = Request.QueryString["Filter"].ToUpper();
                    int    FirstLetterASCII = Asc(FirstLetter);
                    if (FirstLetterASCII >= 65 && FirstLetterASCII <= 90)
                    {
                        // Filter composers by the first initial of name.
                        this.divNonFilter.Visible = false;
                        this.divFilter.Visible    = true;

                        ListcomposersByFirstLetter(FirstLetter);
                        return;
                    }
                }
                // Display all composers
                this.divNonFilter.Visible = true;
                this.divFilter.Visible    = false;

                ListComposers();
            }
        }
    private void OverRideSEOInfo(string categorykey, AspxCommonInfo aspxCommonObj)
    {
        CategorySEOInfo dtCatSEO = AspxFilterController.GetSEOSettingsByCategoryName(categorykey, aspxCommonObj);

        if (dtCatSEO != null)
        {
            string Name            = dtCatSEO.Name.ToString();
            string PageTitle       = dtCatSEO.MetaTitle.ToString();
            string PageKeyWords    = dtCatSEO.MetaKeywords.ToString();
            string PageDescription = dtCatSEO.MetaDescription.ToString();

            if (!string.IsNullOrEmpty(PageTitle))
            {
                SEOHelper.RenderTitle(this.Page, PageTitle, false, true, PortalID);
            }
            else
            {
                SEOHelper.RenderTitle(this.Page, Name, false, true, PortalID);
            }

            if (!string.IsNullOrEmpty(PageKeyWords))
            {
                SEOHelper.RenderMetaTag(this.Page, "KEYWORDS", PageKeyWords, true);
            }

            if (!string.IsNullOrEmpty(PageDescription))
            {
                SEOHelper.RenderMetaTag(this.Page, "DESCRIPTION", PageDescription, true);
            }
        }
    }
예제 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
            }

            string defaulSEOTitle       = this.SettingManager.GetSettingValue("SEO.DefaultTitle");
            string defaulSEODescription = this.SettingManager.GetSettingValue("SEO.DefaultMetaDescription");
            string defaulSEOKeywords    = this.SettingManager.GetSettingValue("SEO.DefaultMetaKeywords");

            SEOHelper.RenderTitle(this.Page, defaulSEOTitle, false, false);
            SEOHelper.RenderMetaTag(this.Page, "description", defaulSEODescription, false);
            SEOHelper.RenderMetaTag(this.Page, "keywords", defaulSEOKeywords, false);
            //if (TCwebContext.Current.WorkingLanguage.LanguageCulture == "zh-CN")
            //{ SEOHelper.RenderHeaderCssLink(this.Page, "/css/cn.css"); }

            //if (this.SettingManager.GetSettingValueBoolean("Display.ShowNewsHeaderRssURL"))
            //{
            //    SEOHelper.RenderHeaderRssLink(this.Page, defaulSEOTitle + ": News", SEOHelper.GetNewsRssUrl());
            //}
            //if (this.SettingManager.GetSettingValueBoolean("Display.ShowBlogHeaderRssURL"))
            //{
            //    SEOHelper.RenderHeaderRssLink(this.Page, defaulSEOTitle + ": Blog", SEOHelper.GetBlogRssUrl());
            //}
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.CacheControl = "private";
            Response.Expires      = 0;
            Response.AddHeader("pragma", "no-cache");

            if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
            {
                string loginURL = CommonHelper.GetLoginPageURL(true);
                Response.Redirect(loginURL);
            }

            if (!ForumManager.AllowPrivateMessages)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = GetLocaleResourceString("PageTitle.ViewPM");

            SEOHelper.RenderTitle(this, title, true);

            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureSSL();
            }
        }
예제 #11
0
    private void OverRideSEOInfo(DataTable dtItemSEO)
    {
        if (dtItemSEO != null && dtItemSEO.Rows.Count > 0)
        {
            itemID   = int.Parse(dtItemSEO.Rows[0]["ItemID"].ToString());
            itemName = dtItemSEO.Rows[0]["Name"].ToString();
            string PageTitle       = dtItemSEO.Rows[0]["MetaTitle"].ToString();
            string PageKeyWords    = dtItemSEO.Rows[0]["MetaKeywords"].ToString();
            string PageDescription = dtItemSEO.Rows[0]["MetaDescription"].ToString();

            if (!string.IsNullOrEmpty(PageTitle))
            {
                SEOHelper.RenderTitle(this.Page, PageTitle, false, true, this.GetPortalID);
            }
            else
            {
                SEOHelper.RenderTitle(this.Page, itemName, false, true, this.GetPortalID);
            }
            if (!string.IsNullOrEmpty(PageKeyWords))
            {
                SEOHelper.RenderMetaTag(this.Page, "KEYWORDS", PageKeyWords, true);
            }

            if (!string.IsNullOrEmpty(PageDescription))
            {
                SEOHelper.RenderMetaTag(this.Page, "DESCRIPTION", PageDescription, true);
            }
        }
    }
예제 #12
0
    private void OverRideSEOInfo(string itemSKU, int storeID, int portalID, string userName, string cultureName)
    {
        ItemSEOInfo dtItemSEO = GetSEOSettingsBySKU(itemSKU, storeID, portalID, userName, cultureName);

        if (dtItemSEO != null)
        {
            itemID   = int.Parse(dtItemSEO.ItemID.ToString());
            itemName = dtItemSEO.Name.ToString();
            string PageTitle       = dtItemSEO.MetaTitle.ToString();
            string PageKeyWords    = dtItemSEO.MetaKeywords.ToString();
            string PageDescription = dtItemSEO.MetaDescription.ToString();

            if (!string.IsNullOrEmpty(PageTitle))
            {
                SEOHelper.RenderTitle(this.Page, PageTitle, false, true, this.GetPortalID);
            }
            else
            {
                SEOHelper.RenderTitle(this.Page, itemName, false, true, this.GetPortalID);
            }
            if (!string.IsNullOrEmpty(PageKeyWords))
            {
                SEOHelper.RenderMetaTag(this.Page, "KEYWORDS", PageKeyWords, true);
            }

            if (!string.IsNullOrEmpty(PageDescription))
            {
                SEOHelper.RenderMetaTag(this.Page, "DESCRIPTION", PageDescription, true);
            }
        }
    }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!ForumManager.AllowPrivateMessages)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = GetLocaleResourceString("PageTitle.PrivateMessages");

            SEOHelper.RenderTitle(this, title, true);

            if (!Page.IsPostBack)
            {
                if (this.Tab.ToLowerInvariant() == "sent")
                {
                    PrivateMessagesTabs.ActiveTab = pnlPrivateMessagesSentItems;
                }
            }
        }
예제 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (product == null || product.Deleted)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = string.Empty;

            if (!string.IsNullOrEmpty(product.LocalizedMetaTitle))
            {
                title = product.LocalizedMetaTitle;
            }
            else
            {
                title = product.LocalizedName;
            }
            SEOHelper.RenderTitle(this, title, true);
            SEOHelper.RenderMetaTag(this, "description", product.LocalizedMetaDescription, true);
            SEOHelper.RenderMetaTag(this, "keywords", product.LocalizedMetaKeywords, true);

            if (!Page.IsPostBack)
            {
                ProductManager.AddProductToRecentlyViewedList(product.ProductId);
            }
        }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureNonSSL();

                ((MasterPages.TwoColumn)Master).Unique.Visible      = false;
                ((MasterPages.TwoColumn)Master).SalesLeader.Visible = false;
            }

            if (product == null || product.Deleted)
            {
                Response.Redirect("~/Default.aspx");
            }

            string title = CommonHelper.IIF(!string.IsNullOrEmpty(product.MetaTitle), product.MetaTitle, product.Name);

            SEOHelper.RenderTitle(this, title, true);
            SEOHelper.RenderMetaTag(this, "description", product.MetaDescription, true);
            SEOHelper.RenderMetaTag(this, "keywords", product.MetaKeywords, true);

            if (!Page.IsPostBack)
            {
                ProductManager.AddProductToRecentlyViewedList(product.ProductID);
                NopContext.Current.LastProductPageVisited = CommonHelper.GetThisPageURL(true);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string title = GetLocaleResourceString("PageTitle.ShowEmailDirectoryList");
         SEOHelper.RenderTitle(this, title, true);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            string title = GetLocaleResourceString("PageTitle.AccountActivation");

            SEOHelper.RenderTitle(this, title, true);
        }
예제 #18
0
        protected override void OnPreRender(EventArgs e)
        {
            string title = GetLocaleResourceString("PageTitle.Sitemap");

            SEOHelper.RenderTitle(this, title, true);

            BindData();
            base.OnPreRender(e);
        }
예제 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SEOHelper.RenderTitle(this, GetLocaleResourceString("PageTitle.Manufactures"), true);
     if (!IsPostBack)
     {
         dlManufacturers.DataSource = ManufacturerManager.GetAllManufacturers();
         dlManufacturers.DataBind();
     }
 }
예제 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ForumGroup forumGroup = this.ForumService.GetForumGroupById(this.ForumGroupId);

            if (forumGroup != null)
            {
                string title = forumGroup.Name;
                SEOHelper.RenderTitle(this, title, true);
            }
        }
예제 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var productTag = this.ProductService.GetProductTagById(this.ProductTagId);

            if (productTag != null)
            {
                string title = string.Format(GetLocaleResourceString("PageTitle.ProductTags"), productTag.Name);
                SEOHelper.RenderTitle(this.Page, title, true);
            }
        }
예제 #22
0
파일: Forum.aspx.cs 프로젝트: terry2012/DSV
        protected void Page_Load(object sender, EventArgs e)
        {
            Forum forum = ForumManager.GetForumById(this.ForumId);

            if (forum != null)
            {
                string title = forum.Name;
                SEOHelper.RenderTitle(this, title, true);
            }
        }
예제 #23
0
파일: Login.aspx.cs 프로젝트: terry2012/DSV
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ApplyLocalization();

            CommonHelper.SetResponseNoCache(Response);

            string title = GetLocaleResourceString("PageTitle.Login");

            SEOHelper.RenderTitle(this, title, true);
        }
예제 #24
0
파일: Topic.aspx.cs 프로젝트: terry2012/DSV
        protected void Page_Load(object sender, EventArgs e)
        {
            ForumTopic forumTopic = ForumManager.GetTopicById(this.TopicId);

            if (forumTopic != null)
            {
                string title = forumTopic.Subject;
                SEOHelper.RenderTitle(this, title, true);
            }
        }
예제 #25
0
파일: Blog.aspx.cs 프로젝트: terry2012/DSV
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!BlogManager.BlogEnabled)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = GetLocaleResourceString("PageTitle.Blog");

            SEOHelper.RenderTitle(this, title, true);
        }
예제 #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureNonSSL();
            }

            string title = GetLocaleResourceString("PageTitle.Boards.Search");

            SEOHelper.RenderTitle(this, title, true);
        }
예제 #27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string title = GetLocaleResourceString("PageTitle.advance_search");
         SEOHelper.RenderTitle(this, title, true);
         this.BindData();
         this.pnResult.Visible     = false;
         this.pnSearchForm.Visible = true;
     }
 }
예제 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string title = GetLocaleResourceString("PageTitle.Default");

            SEOHelper.RenderTitle(this, title, true);

            //if (!Page.IsPostBack)
            //{
            //    BindData();
            //}
        }
예제 #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblCurrentTime.Text = DateTimeHelper.ConvertToUserTime(DateTime.Now).ToString("F");
            }

            string title = GetLocaleResourceString("PageTitle.Boards.Default");

            SEOHelper.RenderTitle(this, title, true);
        }
예제 #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.ProductService.CompareProductsEnabled)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = GetLocaleResourceString("PageTitle.CompareProducts");

            SEOHelper.RenderTitle(this, title, true);
        }