void rptEvents_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.IsItem())
            {
                BaseEventDetailPageItem item = (BaseEventDetailPageItem)e.Item.DataItem;

                FieldRenderer frExpertName = e.FindControlAs<FieldRenderer>("frExpertName");
                FieldRenderer frExpertSubheading = e.FindControlAs<FieldRenderer>("frExpertSubheading");
                System.Web.UI.WebControls.Image imgExpert = e.FindControlAs<System.Web.UI.WebControls.Image>("imgExpert");
                HyperLink hlEventDetail = e.FindControlAs<HyperLink>("hlEventDetail");
                HyperLink hlExpertPicture = e.FindControlAs<HyperLink>("hlExpertPicture");
                Literal litExpertType = e.FindControlAs<Literal>("litExpertType");
                Literal litEventDate = e.FindControlAs<Literal>("litEventDate");
                //Literal litRSVPText = e.FindControlAs<Literal>("litRSVPText");
                Literal litSkipThisText = e.FindControlAs<Literal>("litSkipThisText");

                //litRSVPText.Text = DictionaryConstants.Community_RSVPButtonText;
                //litSkipThisText.Text = DictionaryConstants.Community_SkipThisButtonText;

                litEventDate.Text = item.GetFormattedEventStartDate();
                hlEventDetail.NavigateUrl = item.GetUrl();
                hlExpertPicture.NavigateUrl = item.GetUrl();
                frExpertName.Item = item;

                // Expert details
                ExpertDetailPageItem expert = item.Expert.Item;

                if (expert != null)
                {
                    imgExpert.ImageUrl = expert.GetThumbnailUrl(150, 150);
                    //litExpertType.Text = expert.GetExpertType();
                }
            }
        }
        void rptExperts_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.IsItem())
            {
                ExpertDetailPageItem expert = (ExpertDetailPageItem)e.Item.DataItem;

                HyperLink hlExpertDetail = e.FindControlAs<HyperLink>("hlExpertDetail");
                HyperLink hlExpertDetailCta = e.FindControlAs<HyperLink>("hlExpertDetailCta");
                HyperLink hlOfficeHours = e.FindControlAs<HyperLink>("hlOfficeHours");
                HyperLink hlExpertDetailCtaMobile = e.FindControlAs<HyperLink>("hlExpertDetailCtaMobile");
                HyperLink hlOfficeHoursMobile = e.FindControlAs<HyperLink>("hlOfficeHoursMobile");

                hlExpertDetail.NavigateUrl = hlExpertDetailCta.NavigateUrl = hlExpertDetailCtaMobile.NavigateUrl
                    = expert.GetUrl();

                System.Web.UI.WebControls.Image imgExpert = e.FindControlAs<System.Web.UI.WebControls.Image>("imgExpert");
                imgExpert.ImageUrl = expert.GetThumbnailUrl(150, 150);

                Literal litExpertType = e.FindControlAs<Literal>("litExpertType");
                litExpertType.Text = expert.GetExpertType();

                FieldRenderer frExpertName = e.FindControlAs<FieldRenderer>("frExpertName");
                FieldRenderer frExpertSubheading = e.FindControlAs<FieldRenderer>("frExpertSubheading");

                frExpertName.Item = frExpertSubheading.Item = expert;
            }
        }
 protected void AnswerRepeater_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
 {
     if (e.IsItem())
     {
         var item = (Answer)e.Item.DataItem;
         Item currItem = Sitecore.Context.Item;
         var q = Questions.QuestionFactory(currItem);
         HyperLink hypUserProfileLink = (HyperLink)e.Item.FindControl("hypUserProfileLink");
         if (hypUserProfileLink != null)
         {
             hypUserProfileLink.NavigateUrl = MembershipHelper.GetPublicProfileUrl(item.Author);
         }
         LikeButton btnLikeCtrl = e.FindControlAs<LikeButton>("LikeButton");
         if (btnLikeCtrl != null)
         {
             btnLikeCtrl.LoadState(item.ContentId, item.ContentTypeId);
         }
         HtmlButton btnLikeThumbsUp = e.FindControlAs<HtmlButton>("btnLike");
         if(btnLikeThumbsUp!=null)
         {
             btnLikeThumbsUp.Attributes.Add("commentContentId", item.ContentId);
         }
         //Literal litGroup = e.FindControlAs<Literal>("lbGroup");
         //if (litGroup !=null)
         //{
             
         //    if(q!=null){
         //        litGroup.Text = q.Group;
         //    }
         //}
         //HtmlAnchor hrefAnchor = e.FindControlAs<HtmlAnchor>("hrefTopic");
         //if (hrefAnchor != null)
         //{
         //    hrefAnchor.HRef = currItem.Parent.GetUrl() + "?topic=" + HttpUtility.UrlEncode(q.Group);
         //}
     }
 }
        protected void rptInterests_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.IsItem())
            {
                Interest interest = (Interest)e.Item.DataItem;

                Literal litInterest = e.FindControlAs<Literal>("litInterest");
                ParentInterestItem pii = Sitecore.Context.Database.GetItem(interest.Key);
                if (pii != null)
                {
                    litInterest.Text = pii.InterestName.Rendered;
                }
            }
        }
        protected void rptIssues_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.IsItem())
            {
                ChildIssueItem issue = (ChildIssueItem)e.Item.DataItem;

                Literal litIssue = e.FindControlAs<Literal>("litIssue");

                litIssue.Text = issue.IssueName.Rendered;
            }
        }