private void BindContent()
        {
            if (DataSource != null && DataSource.InheritsTemplate(BaseEventDetailPageItem.TemplateId))
            {
                BaseEventDetailPageItem item = (BaseEventDetailPageItem)DataSource;

                EventUrl = item.GetUrl();

                // Field renderers
                frHeading.Item = frSubheading.Item = frPageTitle.Item = item;

                // Expert details
                ExpertDetailPageItem expert = item.Expert.Item;
                if (expert != null)
                {
                    imgExpert.ImageUrl = expert.GetThumbnailUrl(150, 150);
                    litExpertType.Text = expert.GetExpertType();
                }

                // Webinar/chat
                litEventType.Text = item.GetEventType();

                // Time elapsed
                // TODO: consider moving into helper function
                // TODO: verify documentation for display logic
                DateTime?eventDate = item.GetEventStartDateUtc();
                if (eventDate.HasValue)
                {
                    int daysElapsed = (DateTime.UtcNow - eventDate.Value).Days;
                    if (daysElapsed == 0)
                    {
                        // TODO: display something?
                    }
                    else if (daysElapsed <= 30)
                    {
                        litEventDate.Text    = daysElapsed.ToString();
                        litEventSubDate.Text = DictionaryConstants.DaysAgoLabel;
                    }
                    else
                    {
                        litEventDate.Text    = eventDate.Value.ToString("MMM dd");
                        litEventSubDate.Text = eventDate.Value.ToString("yyyy");
                    }
                }
                CommunityRecommendationIcons.MatchingChildrenIds = item.GetMatchingChildrenIds(this.CurrentMember);
            }
        }
        void rptEvents_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.IsItem())
            {
                BaseEventDetailPageItem item = (BaseEventDetailPageItem)e.Item.DataItem;

                PlaceHolder phLinksCta = e.FindControlAs <PlaceHolder>("phLinksCta");
                phLinksCta.Visible = item.IsUpcoming();

                HyperLink hlExpertImage  = e.FindControlAs <HyperLink>("hlExpertImage");
                HyperLink hlEventDetails = e.FindControlAs <HyperLink>("hlEventDetails");
                HyperLink hlEventTitle   = e.FindControlAs <HyperLink>("hlEventTitle");
                hlExpertImage.NavigateUrl             = hlEventDetails.NavigateUrl
                                                      = hlEventTitle.NavigateUrl = item.GetUrl();

                Literal litEventDate = e.FindControlAs <Literal>("litEventDate");
                litEventDate.Text = item.GetFormattedEventStartDate();

                Literal litEventDatePast = e.FindControlAs <Literal>("litEventDatePast");
                litEventDatePast.Text = item.GetFormattedArchiveEventDate();

                Literal litEventType = e.FindControlAs <Literal>("litEventType");
                litEventType.Text = item.GetEventType();

                FieldRenderer frEventTitle      = e.FindControlAs <FieldRenderer>("frEventTitle");
                FieldRenderer frRsvpLink        = e.FindControlAs <FieldRenderer>("frRsvpLink");
                FieldRenderer frEventHeading    = e.FindControlAs <FieldRenderer>("frEventHeading");
                FieldRenderer frEventSubheading = e.FindControlAs <FieldRenderer>("frEventSubheading");
                frEventTitle.Item = frRsvpLink.Item = frEventHeading.Item = frEventSubheading.Item = item;

                ExpertDetailPageItem expert = item.Expert.Item;
                if (expert != null)
                {
                    System.Web.UI.WebControls.Image imgExpert = e.FindControlAs <System.Web.UI.WebControls.Image>("imgExpert");
                    imgExpert.ImageUrl = expert.GetThumbnailUrl(230, 129);
                }
            }
        }