private string GenerateListOfProductTagss(ProductTagCollection productTags) { StringBuilder result = new StringBuilder(); for (int i = 0; i < productTags.Count; i++) { ProductTag pt = productTags[i]; result.Append(pt.Name.ToString()); if (i != productTags.Count - 1) { result.Append(", "); } } return(result.ToString()); }
protected void BindGrid() { ProductTagCollection productTags = GetProductTags(); if (productTags.Count > 0) { this.gvProductTags.Visible = true; this.lblNoProductTags.Visible = false; this.gvProductTags.DataSource = productTags; this.gvProductTags.DataBind(); } else { this.gvProductTags.Visible = false; this.lblNoProductTags.Visible = true; } }