示例#1
0
 protected override void AttachChildControls()
 {
     if (!long.TryParse(this.Page.Request.QueryString["VoteId"], out this.voteId))
     {
         base.GotoResourceNotFound();
     }
     this.lblTotal    = (System.Web.UI.WebControls.Label) this.FindControl("lblTotal");
     this.lblVoteName = (System.Web.UI.WebControls.Literal) this.FindControl("lblVoteName");
     this.rptVoteItem = (ThemedTemplatedRepeater)this.FindControl("rptVoteItem");
     if (!this.Page.IsPostBack)
     {
         VoteInfo voteById = CommentBrowser.GetVoteById(this.voteId);
         if (voteById != null)
         {
             PageTitle.AddSiteNameTitle(voteById.VoteName);
             this.Vote(voteById);
             VoteInfo voteById2 = CommentBrowser.GetVoteById(this.voteId);
             this.BindVoteItem(voteById2);
         }
     }
 }