public override void OnPageLoaded() { string letter = this.llCategory.FirstLetter, title = string.Empty; StringBuilder sbKeywords = new StringBuilder(); switch (this.llCategory.LetterType) { case LettersType.Category: List <ProductCategory> listCategory = ProductCategories.GetCategoreisByPY(letter); if (null == listCategory || 0 == listCategory.Count) { } else { foreach (ProductCategory item in listCategory) { sbKeywords.AppendFormat("{0},", item.CategoryName); } } title = "分类"; break; case LettersType.Brand: List <ProductBrand> listBrand = ProductBrands.GetBrandsByPY(letter); if (null == listBrand || 0 == listBrand.Count) { } else { foreach (ProductBrand item in listBrand) { sbKeywords.AppendFormat("{0},", item.BrandName); } } title = "品牌"; break; case LettersType.Industry: List <ProductIndustry> listIndustry = ProductIndustries.GetIndustriesByPY(letter); if (null == listIndustry || 0 == listIndustry.Count) { } else { foreach (ProductIndustry item in listIndustry) { sbKeywords.AppendFormat("{0},", item.IndustryName); } } title = "行业"; break; } string keywords = sbKeywords.ToString().TrimEnd(','); if (string.IsNullOrEmpty(keywords)) { //this.AddKeywords(keywords); this.AddDescription(string.Format("按照首字母进行{0}检索,首字母是{1}", title, letter.ToUpper())); this.ShortTitle = string.Format("首字母{0}检索{1}", title, letter.ToUpper()); } else { this.AddKeywords(keywords); this.AddDescription(string.Format("按照首字母进行{0}检索,首字母是{1},符合条件的{0}列表如下: {2}", title, letter.ToUpper(), keywords)); this.ShortTitle = string.Format("首字母{0}检索{1} - {2}", title, letter.ToUpper(), keywords); } this.SetTitle(); }