private void BindImages() { AdditionalImagesRepeater.DataSource = _Product.Images; AdditionalImagesRepeater.DataBind(); ImagesPanel.Visible = AdditionalImagesRepeater.Items.Count > 0; NoImagesPanel.Visible = !ImagesPanel.Visible; }
public void BindImages() { Caption.Text = string.Format(Caption.Text, _Product.Name); if (!Page.IsPostBack) { IconImageUrl.Text = _Product.IconUrl; IconImageAltText.Text = _Product.IconAltText; ThumbnailImageUrl.Text = _Product.ThumbnailUrl; ThumbnailImageAltText.Text = _Product.ThumbnailAltText; StandardImageUrl.Text = _Product.ImageUrl; StandardImageAltText.Text = _Product.ImageAltText; } if (_Product.Images.Count > 0) { AdditionalImagesRepeater.Visible = true; AdditionalImagesRepeater.DataSource = _Product.Images; AdditionalImagesRepeater.DataBind(); } else { AdditionalImagesRepeater.Visible = false; } }