예제 #1
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId))
     {
         base.GotoResourceNotFound();
     }
     this.litLeadBuy = (Common_CategoryLeadBuy)this.FindControl("Common_CategoryLeadBuy");
     if (!this.Page.IsPostBack)
     {
         CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId);
         if (category != null)
         {
             if (!string.IsNullOrEmpty(category.MetaKeywords))
             {
                 MetaTags.AddMetaKeywords(category.MetaKeywords, HiContext.Current.Context);
             }
             if (!string.IsNullOrEmpty(category.MetaDescription))
             {
                 MetaTags.AddMetaDescription(category.MetaDescription, HiContext.Current.Context);
             }
             if (!string.IsNullOrEmpty(category.Name))
             {
                 PageTitle.AddTitle(category.MetaTitle, HiContext.Current.Context);
             }
             if (this.litLeadBuy != null)
             {
                 this.litLeadBuy.Text = category.Notes1;
             }
         }
         this.LoadPageSearch(category);
     }
     base.AttachChildControls();
 }
예제 #2
0
 private void LoadCategoryHead(BrandCategoryInfo brandcategory)
 {
     if (!string.IsNullOrEmpty(brandcategory.MetaKeywords))
     {
         MetaTags.AddMetaKeywords(brandcategory.MetaKeywords, Hidistro.Membership.Context.HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(brandcategory.MetaKeywords))
     {
         MetaTags.AddMetaDescription(brandcategory.MetaDescription, Hidistro.Membership.Context.HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(brandcategory.BrandName))
     {
         PageTitle.AddSiteNameTitle(brandcategory.BrandName, Hidistro.Membership.Context.HiContext.Current.Context);
     }
 }
예제 #3
0
 private void LoadPageSearch(ProductInfo productDetails)
 {
     if (!string.IsNullOrEmpty(productDetails.MetaKeywords))
     {
         MetaTags.AddMetaKeywords(productDetails.MetaKeywords, HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(productDetails.MetaDescription))
     {
         MetaTags.AddMetaDescription(productDetails.MetaDescription, HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(productDetails.Title))
     {
         PageTitle.AddSiteNameTitle(productDetails.Title);
         return;
     }
     PageTitle.AddSiteNameTitle(productDetails.ProductName);
 }
예제 #4
0
 private void LoadPageSearch(CategoryInfo category)
 {
     if (!string.IsNullOrEmpty(category.MetaKeywords))
     {
         MetaTags.AddMetaKeywords(category.MetaKeywords, HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(category.MetaDescription))
     {
         MetaTags.AddMetaDescription(category.MetaDescription, HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(category.MetaTitle))
     {
         PageTitle.AddSiteNameTitle(category.MetaTitle);
         return;
     }
     PageTitle.AddSiteNameTitle(category.Name);
 }
예제 #5
0
 private void LoadPageSearch(GiftInfo gift)
 {
     if (!string.IsNullOrEmpty(gift.Meta_Keywords))
     {
         MetaTags.AddMetaKeywords(gift.Meta_Keywords, HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(gift.Meta_Description))
     {
         MetaTags.AddMetaDescription(gift.Meta_Description, HiContext.Current.Context);
     }
     if (!string.IsNullOrEmpty(gift.Title))
     {
         PageTitle.AddSiteNameTitle(gift.Title);
         return;
     }
     PageTitle.AddSiteNameTitle(gift.Name);
 }
예제 #6
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["helpId"], out this.helpId))
     {
         base.GotoResourceNotFound();
     }
     this.litHelpAddedDate   = (FormatedTimeLabel)this.FindControl("litHelpAddedDate");
     this.litHelpDescription = (System.Web.UI.WebControls.Literal) this.FindControl("litHelpDescription");
     this.litHelpContent     = (System.Web.UI.WebControls.Literal) this.FindControl("litHelpContent");
     this.litHelpTitle       = (System.Web.UI.WebControls.Literal) this.FindControl("litHelpTitle");
     this.lblFront           = (System.Web.UI.WebControls.Label) this.FindControl("lblFront");
     this.lblNext            = (System.Web.UI.WebControls.Label) this.FindControl("lblNext");
     this.lblFrontTitle      = (System.Web.UI.WebControls.Label) this.FindControl("lblFrontTitle");
     this.lblNextTitle       = (System.Web.UI.WebControls.Label) this.FindControl("lblNextTitle");
     this.aFront             = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("front");
     this.aNext = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("next");
     if (!this.Page.IsPostBack)
     {
         HelpInfo help = CommentBrowser.GetHelp(this.helpId);
         if (help != null)
         {
             PageTitle.AddSiteNameTitle(help.Title);
             if (!string.IsNullOrEmpty(help.MetaKeywords))
             {
                 MetaTags.AddMetaKeywords(help.MetaKeywords, HiContext.Current.Context);
             }
             if (!string.IsNullOrEmpty(help.MetaDescription))
             {
                 MetaTags.AddMetaDescription(help.MetaDescription, HiContext.Current.Context);
             }
             this.litHelpTitle.Text       = help.Title;
             this.litHelpDescription.Text = help.Description;
             string str = HiContext.Current.HostPath + Globals.GetSiteUrls().UrlData.FormatUrl("HelpDetails", new object[]
             {
                 this.helpId
             });
             this.litHelpContent.Text   = help.Content.Replace("href=\"#\"", "href=\"" + str + "\"");
             this.litHelpAddedDate.Time = help.AddedDate;
             HelpInfo frontOrNextHelp = CommentBrowser.GetFrontOrNextHelp(this.helpId, help.CategoryId, "Front");
             if (frontOrNextHelp != null && frontOrNextHelp.HelpId > 0)
             {
                 if (this.lblFront != null)
                 {
                     this.lblFront.Visible   = true;
                     this.aFront.HRef        = "HelpDetails.aspx?helpId=" + frontOrNextHelp.HelpId;
                     this.lblFrontTitle.Text = frontOrNextHelp.Title;
                 }
             }
             else
             {
                 if (this.lblFront != null)
                 {
                     this.lblFront.Visible = false;
                 }
             }
             HelpInfo frontOrNextHelp2 = CommentBrowser.GetFrontOrNextHelp(this.helpId, help.CategoryId, "Next");
             if (frontOrNextHelp2 != null && frontOrNextHelp2.HelpId > 0)
             {
                 if (this.lblNext != null)
                 {
                     this.lblNext.Visible   = true;
                     this.aNext.HRef        = "HelpDetails.aspx?helpId=" + frontOrNextHelp2.HelpId;
                     this.lblNextTitle.Text = frontOrNextHelp2.Title;
                     return;
                 }
             }
             else
             {
                 if (this.lblNext != null)
                 {
                     this.lblNext.Visible = false;
                 }
             }
         }
     }
 }
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["articleId"], out this.articleId))
     {
         base.GotoResourceNotFound();
     }
     this.litArticleAddedDate   = (FormatedTimeLabel)this.FindControl("litArticleAddedDate");
     this.litArticleContent     = (Literal)this.FindControl("litArticleContent");
     this.litArticleDescription = (Literal)this.FindControl("litArticleDescription");
     this.litArticleTitle       = (Literal)this.FindControl("litArticleTitle");
     this.lblFront      = (Label)this.FindControl("lblFront");
     this.lblNext       = (Label)this.FindControl("lblNext");
     this.lblFrontTitle = (Label)this.FindControl("lblFrontTitle");
     this.lblNextTitle  = (Label)this.FindControl("lblNextTitle");
     this.aFront        = (HtmlAnchor)this.FindControl("front");
     this.aNext         = (HtmlAnchor)this.FindControl("next");
     this.ariticlative  = (Common_ArticleRelative)this.FindControl("list_Common_ArticleRelative");
     if (!this.Page.IsPostBack)
     {
         ArticleInfo article = CommentBrowser.GetArticle(this.articleId);
         if ((article != null) && article.IsRelease)
         {
             PageTitle.AddSiteNameTitle(article.Title, HiContext.Current.Context);
             if (!string.IsNullOrEmpty(article.MetaKeywords))
             {
                 MetaTags.AddMetaKeywords(article.MetaKeywords, HiContext.Current.Context);
             }
             if (!string.IsNullOrEmpty(article.MetaDescription))
             {
                 MetaTags.AddMetaDescription(article.MetaDescription, HiContext.Current.Context);
             }
             this.litArticleTitle.Text       = article.Title;
             this.litArticleDescription.Text = article.Description;
             string str = HiContext.Current.HostPath + Globals.GetSiteUrls().UrlData.FormatUrl("ArticleDetails", new object[] { this.articleId });
             this.litArticleContent.Text   = article.Content.Replace("href=\"#\"", "href=\"" + str + "\"");
             this.litArticleAddedDate.Time = article.AddedDate;
             ArticleInfo info2 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Front", article.CategoryId);
             if ((info2 != null) && (info2.ArticleId > 0))
             {
                 if (this.lblFront != null)
                 {
                     this.lblFront.Visible   = true;
                     this.aFront.HRef        = Globals.GetSiteUrls().UrlData.FormatUrl("ArticleDetails", new object[] { info2.ArticleId });
                     this.lblFrontTitle.Text = info2.Title;
                 }
             }
             else if (this.lblFront != null)
             {
                 this.lblFront.Visible = false;
             }
             ArticleInfo info3 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Next", article.CategoryId);
             if ((info3 != null) && (info3.ArticleId > 0))
             {
                 if (this.lblNext != null)
                 {
                     this.lblNext.Visible   = true;
                     this.aNext.HRef        = Globals.GetSiteUrls().UrlData.FormatUrl("ArticleDetails", new object[] { info3.ArticleId });
                     this.lblNextTitle.Text = info3.Title;
                 }
             }
             else if (this.lblNext != null)
             {
                 this.lblNext.Visible = false;
             }
             this.ariticlative.DataSource = CommentBrowser.GetArticlProductList(this.articleId);
             this.ariticlative.DataBind();
         }
     }
 }
예제 #8
0
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["articleId"], out this.articleId))
            {
                base.GotoResourceNotFound("");
            }
            this.hdAppId               = (HtmlInputHidden)this.FindControl("hdAppId");
            this.hdTitle               = (HtmlInputHidden)this.FindControl("hdTitle");
            this.hdDesc                = (HtmlInputHidden)this.FindControl("hdDesc");
            this.hdImgUrl              = (HtmlInputHidden)this.FindControl("hdImgUrl");
            this.hdLink                = (HtmlInputHidden)this.FindControl("hdLink");
            this.txtCatgoryId          = (HtmlInputHidden)this.FindControl("txtCatgoryId");
            this.litArticleAddedDate   = (FormatedTimeLabel)this.FindControl("litArticleAddedDate");
            this.litArticleContent     = (Literal)this.FindControl("litArticleContent");
            this.litArticleDescription = (Literal)this.FindControl("litArticleDescription");
            this.litArticleTitle       = (Literal)this.FindControl("litArticleTitle");
            this.lblFront              = (Label)this.FindControl("lblFront");
            this.lblNext               = (Label)this.FindControl("lblNext");
            this.lblFrontTitle         = (Label)this.FindControl("lblFrontTitle");
            this.lblNextTitle          = (Label)this.FindControl("lblNextTitle");
            this.aFront                = (HtmlAnchor)this.FindControl("front");
            this.aNext        = (HtmlAnchor)this.FindControl("next");
            this.ariticlative = (Common_ArticleRelative)this.FindControl("list_Common_ArticleRelative");
            SiteSettings siteSettings = HiContext.Current.SiteSettings;

            this.hdAppId.Value = siteSettings.WeixinAppId;
            if (!this.Page.IsPostBack)
            {
                ArticleInfo article = CommentBrowser.GetArticle(this.articleId);
                if (article?.IsRelease ?? false)
                {
                    this.hdDesc.Value   = (string.IsNullOrEmpty(article.Description) ? article.Title : article.Title);
                    this.hdImgUrl.Value = (string.IsNullOrEmpty(article.IconUrl) ? Globals.FullPath(siteSettings.DefaultProductImage) : (article.IconUrl.Contains("http://") ? article.IconUrl : ("http://" + HttpContext.Current.Request.Url.Host + article.IconUrl)));
                    this.hdLink.Value   = Globals.FullPath(HttpContext.Current.Request.Url.ToString());
                    this.hdTitle.Value  = article.Title;
                    ArticleHelper.AddHits(this.articleId);
                    if (this.txtCatgoryId != null)
                    {
                        this.txtCatgoryId.Value = article.CategoryId.ToString();
                    }
                    PageTitle.AddSiteNameTitle(article.Title);
                    if (!string.IsNullOrEmpty(article.Meta_Keywords))
                    {
                        MetaTags.AddMetaKeywords(article.Meta_Keywords, HiContext.Current.Context);
                    }
                    if (!string.IsNullOrEmpty(article.Meta_Description))
                    {
                        MetaTags.AddMetaDescription(article.Meta_Description, HiContext.Current.Context);
                    }
                    this.litArticleTitle.Text       = article.Title;
                    this.litArticleDescription.Text = article.Description;
                    string str = HiContext.Current.HostPath + base.GetRouteUrl("ArticleDetails", new
                    {
                        this.articleId
                    });
                    this.litArticleContent.Text   = article.Content.Replace("href=\"#\"", "href=\"" + str + "\"");
                    this.litArticleAddedDate.Time = article.AddedDate;
                    ArticleInfo frontOrNextArticle = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Front", article.CategoryId);
                    if (frontOrNextArticle != null && frontOrNextArticle.ArticleId > 0)
                    {
                        if (this.lblFront != null)
                        {
                            this.lblFront.Visible   = true;
                            this.aFront.HRef        = "ArticleDetails.aspx?ArticleId=" + frontOrNextArticle.ArticleId;
                            this.lblFrontTitle.Text = frontOrNextArticle.Title;
                        }
                    }
                    else if (this.lblFront != null)
                    {
                        this.lblFront.Visible = false;
                    }
                    ArticleInfo frontOrNextArticle2 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Next", article.CategoryId);
                    if (frontOrNextArticle2 != null && frontOrNextArticle2.ArticleId > 0)
                    {
                        if (this.lblNext != null)
                        {
                            this.lblNext.Visible   = true;
                            this.aNext.HRef        = "ArticleDetails.aspx?ArticleId=" + frontOrNextArticle2.ArticleId;
                            this.lblNextTitle.Text = frontOrNextArticle2.Title;
                        }
                    }
                    else if (this.lblNext != null)
                    {
                        this.lblNext.Visible = false;
                    }
                }
            }
        }
예제 #9
0
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["articleId"], out this.articleId))
            {
                base.GotoResourceNotFound("");
            }
            this.txtCatgoryId          = (HtmlInputHidden)this.FindControl("txtCatgoryId");
            this.litArticleAddedDate   = (FormatedTimeLabel)this.FindControl("litArticleAddedDate");
            this.litArticleContent     = (Literal)this.FindControl("litArticleContent");
            this.litArticleDescription = (Literal)this.FindControl("litArticleDescription");
            this.litArticleTitle       = (Literal)this.FindControl("litArticleTitle");
            this.lblFront      = (Label)this.FindControl("lblFront");
            this.lblNext       = (Label)this.FindControl("lblNext");
            this.lblFrontTitle = (Label)this.FindControl("lblFrontTitle");
            this.lblNextTitle  = (Label)this.FindControl("lblNextTitle");
            this.aFront        = (HtmlAnchor)this.FindControl("front");
            this.aNext         = (HtmlAnchor)this.FindControl("next");
            this.ariticlative  = (Common_ArticleRelative)this.FindControl("list_Common_ArticleRelative");
            if (!this.Page.IsPostBack)
            {
                ArticleInfo article = CommentBrowser.GetArticle(this.articleId);
                if ((article != null) && article.IsRelease)
                {
                    if (this.txtCatgoryId != null)
                    {
                        this.txtCatgoryId.Value = article.CategoryId.ToString();
                    }
                    PageTitle.AddSiteNameTitle(article.Title);
                    if (!string.IsNullOrEmpty(article.MetaKeywords))
                    {
                        MetaTags.AddMetaKeywords(article.MetaKeywords, HiContext.Current.Context);
                    }
                    if (!string.IsNullOrEmpty(article.MetaDescription))
                    {
                        MetaTags.AddMetaDescription(article.MetaDescription, HiContext.Current.Context);
                    }
                    this.litArticleTitle.Text       = article.Title;
                    this.litArticleDescription.Text = article.Description;
                    string str = HiContext.Current.HostPath + Globals.GetSiteUrls().UrlData.FormatUrl("ArticleDetails", new object[] { this.articleId });
                    this.litArticleContent.Text   = article.Content.Replace("href=\"#\"", "href=\"" + str + "\"");
                    this.litArticleAddedDate.Time = article.AddedDate;
                    ArticleInfo info2 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Front", article.CategoryId);
                    if ((info2 != null) && (info2.ArticleId > 0))
                    {
                        if (this.lblFront != null)
                        {
                            this.lblFront.Visible   = true;
                            this.aFront.HRef        = "ArticleDetails.aspx?ArticleId=" + info2.ArticleId;
                            this.lblFrontTitle.Text = info2.Title;
                        }
                    }
                    else if (this.lblFront != null)
                    {
                        this.lblFront.Visible = false;
                    }
                    ArticleInfo info3 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Next", article.CategoryId);
                    if ((info3 != null) && (info3.ArticleId > 0))
                    {
                        if (this.lblNext != null)
                        {
                            this.lblNext.Visible   = true;
                            this.aNext.HRef        = "ArticleDetails.aspx?ArticleId=" + info3.ArticleId;
                            this.lblNextTitle.Text = info3.Title;
                        }
                    }
                    else if (this.lblNext != null)
                    {
                        this.lblNext.Visible = false;
                    }


                    //如果该文章绑定了优惠券,则自动领取优惠券
                    if (article.CouponId > 0)
                    {
                        MemberInfo currentMember = MemberProcessor.GetCurrentMember();
                        if (!CouponHelper.CheckUserIsCoupon(currentMember.UserId, article.CouponId))
                        {
                            //如果还没有领取过,开始领取优惠券
                            int    number;
                            string claimCode = string.Empty;
                            claimCode += article.CouponId + "|" + currentMember.UserId;
                            claimCode  = claimCode.PadLeft(15, 'w');//w代表文章列表获取的
                            CouponItemInfo item = new CouponItemInfo();
                            System.Collections.Generic.IList <CouponItemInfo> listCouponItem = new System.Collections.Generic.List <CouponItemInfo>();
                            item = new CouponItemInfo(article.CouponId, claimCode, new int?(currentMember.UserId), currentMember.UserName, currentMember.Email, System.DateTime.Now);
                            listCouponItem.Add(item);
                            CouponHelper.SendClaimCodes(article.CouponId, listCouponItem);
                            this.Page.Response.Write("<script>alert('恭喜您成功领取了一张优惠券!')</script>");
                        }
                        else
                        {
                            //this.Page.Response.Write("<script>alert('请勿重复领取!')</script>");
                        }
                    }
                }
            }
        }
예제 #10
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["articleId"], out this.articleId))
     {
         base.GotoResourceNotFound("");
     }
     this.txtCatgoryId          = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtCatgoryId");
     this.litArticleAddedDate   = (FormatedTimeLabel)this.FindControl("litArticleAddedDate");
     this.litArticleContent     = (System.Web.UI.WebControls.Literal) this.FindControl("litArticleContent");
     this.litArticleDescription = (System.Web.UI.WebControls.Literal) this.FindControl("litArticleDescription");
     this.litArticleTitle       = (System.Web.UI.WebControls.Literal) this.FindControl("litArticleTitle");
     this.lblFront      = (System.Web.UI.WebControls.Label) this.FindControl("lblFront");
     this.lblNext       = (System.Web.UI.WebControls.Label) this.FindControl("lblNext");
     this.lblFrontTitle = (System.Web.UI.WebControls.Label) this.FindControl("lblFrontTitle");
     this.lblNextTitle  = (System.Web.UI.WebControls.Label) this.FindControl("lblNextTitle");
     this.aFront        = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("front");
     this.aNext         = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("next");
     this.ariticlative  = (Common_ArticleRelative)this.FindControl("list_Common_ArticleRelative");
     if (!this.Page.IsPostBack)
     {
         ArticleInfo article = CommentBrowser.GetArticle(this.articleId);
         if (article != null && article.IsRelease)
         {
             if (this.txtCatgoryId != null)
             {
                 this.txtCatgoryId.Value = article.CategoryId.ToString();
             }
             PageTitle.AddSiteNameTitle(article.Title);
             if (!string.IsNullOrEmpty(article.MetaKeywords))
             {
                 MetaTags.AddMetaKeywords(article.MetaKeywords, HiContext.Current.Context);
             }
             if (!string.IsNullOrEmpty(article.MetaDescription))
             {
                 MetaTags.AddMetaDescription(article.MetaDescription, HiContext.Current.Context);
             }
             this.litArticleTitle.Text       = article.Title;
             this.litArticleDescription.Text = article.Description;
             string str = HiContext.Current.HostPath + Globals.GetSiteUrls().UrlData.FormatUrl("ArticleDetails", new object[]
             {
                 this.articleId
             });
             this.litArticleContent.Text   = article.Content.Replace("href=\"#\"", "href=\"" + str + "\"");
             this.litArticleAddedDate.Time = article.AddedDate;
             ArticleInfo frontOrNextArticle = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Front", article.CategoryId);
             if (frontOrNextArticle != null && frontOrNextArticle.ArticleId > 0)
             {
                 if (this.lblFront != null)
                 {
                     this.lblFront.Visible   = true;
                     this.aFront.HRef        = "/WapShop/ArticleDetails.aspx?ArticleId=" + frontOrNextArticle.ArticleId;
                     this.lblFrontTitle.Text = frontOrNextArticle.Title;
                 }
             }
             else
             {
                 if (this.lblFront != null)
                 {
                     this.lblFront.Visible = false;
                 }
             }
             ArticleInfo frontOrNextArticle2 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Next", article.CategoryId);
             if (frontOrNextArticle2 != null && frontOrNextArticle2.ArticleId > 0)
             {
                 if (this.lblNext != null)
                 {
                     this.lblNext.Visible   = true;
                     this.aNext.HRef        = "/WapShop/ArticleDetails.aspx?ArticleId=" + frontOrNextArticle2.ArticleId;
                     this.lblNextTitle.Text = frontOrNextArticle2.Title;
                     return;
                 }
             }
             else
             {
                 if (this.lblNext != null)
                 {
                     this.lblNext.Visible = false;
                 }
             }
         }
     }
 }
예제 #11
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(base.GetParameter("articleId", false), out this.articleId))
     {
         base.GotoResourceNotFound();
     }
     this.litArticleAddedDate   = (FormatedTimeLabel)this.FindControl("litArticleAddedDate");
     this.litArticleContent     = (Literal)this.FindControl("litArticleContent");
     this.litArticleDescription = (Literal)this.FindControl("litArticleDescription");
     this.litArticleTitle       = (Literal)this.FindControl("litArticleTitle");
     this.lblFront      = (Label)this.FindControl("lblFront");
     this.lblNext       = (Label)this.FindControl("lblNext");
     this.lblFrontTitle = (Label)this.FindControl("lblFrontTitle");
     this.lblNextTitle  = (Label)this.FindControl("lblNextTitle");
     this.aFront        = (HtmlAnchor)this.FindControl("front");
     this.aNext         = (HtmlAnchor)this.FindControl("next");
     this.ariticlative  = (Common_ArticleRelative)this.FindControl("list_Common_ArticleRelative");
     if (!this.Page.IsPostBack)
     {
         ArticleInfo article = CommentBrowser.GetArticle(this.articleId);
         if (article?.IsRelease ?? false)
         {
             ArticleHelper.AddHits(this.articleId);
             PageTitle.AddSiteNameTitle(article.Title);
             if (!string.IsNullOrEmpty(article.Meta_Keywords))
             {
                 MetaTags.AddMetaKeywords(article.Meta_Keywords, HiContext.Current.Context);
             }
             if (!string.IsNullOrEmpty(article.Meta_Description))
             {
                 MetaTags.AddMetaDescription(article.Meta_Description, HiContext.Current.Context);
             }
             this.litArticleTitle.Text       = article.Title;
             this.litArticleDescription.Text = article.Description;
             string str = HiContext.Current.HostPath + base.GetRouteUrl("ArticleDetails", new
             {
                 this.articleId
             });
             this.litArticleContent.Text   = article.Content.Replace("href=\"#\"", "href=\"" + str + "\"");
             this.litArticleAddedDate.Time = article.AddedDate;
             ArticleInfo frontOrNextArticle = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Front", article.CategoryId);
             if (frontOrNextArticle != null && frontOrNextArticle.ArticleId > 0)
             {
                 if (this.lblFront != null)
                 {
                     this.lblFront.Visible = true;
                     this.aFront.HRef      = base.GetRouteUrl("ArticleDetails", new
                     {
                         articleId = frontOrNextArticle.ArticleId
                     });
                     this.lblFrontTitle.Text = frontOrNextArticle.Title;
                 }
             }
             else if (this.lblFront != null)
             {
                 this.lblFront.Visible = false;
             }
             ArticleInfo frontOrNextArticle2 = CommentBrowser.GetFrontOrNextArticle(this.articleId, "Next", article.CategoryId);
             if (frontOrNextArticle2 != null && frontOrNextArticle2.ArticleId > 0)
             {
                 if (this.lblNext != null)
                 {
                     this.lblNext.Visible = true;
                     this.aNext.HRef      = base.GetRouteUrl("ArticleDetails", new
                     {
                         articleId = frontOrNextArticle2.ArticleId
                     });
                     this.lblNextTitle.Text = frontOrNextArticle2.Title;
                 }
             }
             else if (this.lblNext != null)
             {
                 this.lblNext.Visible = false;
             }
             this.ariticlative.DataSource = CommentBrowser.GetArticlProductList(this.articleId);
             this.ariticlative.DataBind();
         }
     }
 }